Fix controllers and use auto-discovery.

This commit is contained in:
Pol Dellaiera 2021-05-06 17:35:39 +02:00
parent e9a7a05fb7
commit ac9d0242ad
2 changed files with 4 additions and 12 deletions

View File

@ -38,6 +38,10 @@ services:
tags: tags:
- { name: validator.constraint_validator, alias: birthdate_not_before } - { name: validator.constraint_validator, alias: birthdate_not_before }
Chill\PersonBundle\Controller\:
resource: '../src/Controller/'
tags: ['controller.service_arguments']
Chill\PersonBundle\Repository\: Chill\PersonBundle\Repository\:
resource: '../src/Repository/' resource: '../src/Repository/'
tags: ['doctrine.repository_service'] tags: ['doctrine.repository_service']

View File

@ -1,16 +1,4 @@
services: services:
Chill\PersonBundle\Controller\PersonController:
arguments:
$similarPersonMatcher: '@Chill\PersonBundle\Search\SimilarPersonMatcher'
$translator: '@Symfony\Component\Translation\TranslatorInterface'
$eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface'
$personRepository: '@Chill\PersonBundle\Repository\PersonRepository'
$configPersonAltNameHelper: '@Chill\PersonBundle\Config\ConfigPersonAltNamesHelper'
$logger: '@Psr\Log\LoggerInterface'
$validator: '@Symfony\Component\Validator\Validator\ValidatorInterface'
$em: '@Doctrine\ORM\EntityManagerInterface'
tags: ['controller.service_arguments']
Chill\PersonBundle\Controller\TimelinePersonController: Chill\PersonBundle\Controller\TimelinePersonController:
arguments: arguments:
$eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface' $eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface'