Release 2.41 (#5653)

This commit is contained in:
Kevin Papst
2025-11-08 23:03:44 +01:00
committed by GitHub
parent 636a51e721
commit 1a38c7d7a3
57 changed files with 705 additions and 409 deletions

View File

@@ -22,6 +22,7 @@ use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
@@ -94,6 +95,10 @@ final class TeamController extends AbstractController
{
$newTeam = clone $team;
if ($team->getName() === null) {
throw new BadRequestHttpException('Team with empty name cannot be duplicated');
}
$i = 1;
do {
$newName = \sprintf('%s (%s)', $team->getName(), $i++);