fixes after merge of master into upgrade-sf4

This commit is contained in:
2024-02-12 22:31:16 +01:00
parent 37af488f69
commit f889d67e94
664 changed files with 795 additions and 1980 deletions

View File

@@ -13,6 +13,4 @@ namespace Chill\EventBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class ChillEventBundle extends Bundle
{
}
class ChillEventBundle extends Bundle {}

View File

@@ -51,14 +51,14 @@ final class EventController extends AbstractController
* EventController constructor.
*/
public function __construct(
EventDispatcherInterface $eventDispatcher,
AuthorizationHelper $authorizationHelper,
FormFactoryInterface $formFactoryInterface,
TranslatorInterface $translator,
PaginatorFactory $paginator,
private readonly EventDispatcherInterface $eventDispatcher,
private readonly AuthorizationHelperInterface $authorizationHelper,
private readonly FormFactoryInterface $formFactoryInterface,
private readonly TranslatorInterface $translator,
private readonly PaginatorFactory $paginator,
private readonly Security $security,
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry
) {
}
) {}
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/{event_id}/delete", name="chill_event__event_delete", requirements={"event_id"="\d+"}, methods={"GET", "DELETE"})

View File

@@ -40,8 +40,7 @@ final readonly class EventListController
private PaginatorFactoryInterface $paginatorFactory,
private TranslatableStringHelperInterface $translatableStringHelper,
private UrlGeneratorInterface $urlGenerator,
) {
}
) {}
/**
* @Route("{_locale}/event/event/list", name="chill_event_event_list")

View File

@@ -42,8 +42,7 @@ final class ParticipationController extends AbstractController
private readonly EventRepository $eventRepository,
private readonly PersonRepository $personRepository,
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry
) {
}
) {}
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/participation/create", name="chill_event_participation_create")

View File

@@ -27,9 +27,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
*/
final class ParticipationType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper)
{
}
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -20,9 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
final class RoleType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper)
{
}
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -43,8 +43,7 @@ final class PickEventType extends AbstractType
private readonly UrlGeneratorInterface $urlGenerator,
private readonly TranslatorInterface $translator,
private readonly Security $security
) {
}
) {}
public function buildView(\Symfony\Component\Form\FormView $view, \Symfony\Component\Form\FormInterface $form, array $options)
{

View File

@@ -32,8 +32,7 @@ final class PickRoleType extends AbstractType
private readonly TranslatableStringHelperInterface $translatableStringHelper,
private readonly TranslatorInterface $translator,
private readonly RoleRepository $roleRepository
) {
}
) {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -33,9 +33,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
*/
final class PickStatusType extends AbstractType
{
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected TranslatorInterface $translator, protected StatusRepository $statusRepository)
{
}
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected TranslatorInterface $translator, protected StatusRepository $statusRepository) {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -22,8 +22,7 @@ final readonly class SectionMenuBuilder implements LocalMenuBuilderInterface
public function __construct(
private Security $security,
private TranslatorInterface $translator,
) {
}
) {}
public function buildMenu($menuId, MenuItem $menu, array $parameters)
{

View File

@@ -29,8 +29,7 @@ final readonly class EventACLAwareRepository implements EventACLAwareRepositoryI
private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser,
private EntityManagerInterface $entityManager,
private Security $security,
) {
}
) {}
/**
* @throws NonUniqueResultException

View File

@@ -43,8 +43,7 @@ class EventSearch extends AbstractSearch
private readonly AuthorizationHelper $authorizationHelper,
private readonly \Twig\Environment $templating,
private readonly PaginatorFactory $paginatorFactory
) {
}
) {}
public function getOrder()
{

View File

@@ -30,9 +30,7 @@ class EventListControllerTest extends WebTestCase
private readonly PaginatorFactory $paginatorFactory;
private readonly Environment $environment;
protected function setUp(): void
{
}
protected function setUp(): void {}
public function testList(): void
{

View File

@@ -48,8 +48,8 @@ final class ParticipationControllerTest extends WebTestCase
protected function prepareDI(): void
{
$this->em = self::$container->get(EntityManagerInterface::class);
$this->eventRepository = self::$container->get(EventRepository::class);
$this->em = self::getContainer()->get(EntityManagerInterface::class);
$this->eventRepository = self::getContainer()->get(EventRepository::class);
$this->personsIdsCache = [];
}

View File

@@ -67,7 +67,7 @@ class EventACLAwareRepositoryTest extends KernelTestCase
public function buildEventACLAwareRepository(): EventACLAwareRepository
{
$em = self::$container->get(EntityManagerInterface::class);
$em = self::getContainer()->get(EntityManagerInterface::class);
$user = $em->createQuery('SELECT u FROM '.User::class.' u')
->setMaxResults(1)
->getSingleResult()