Service autodiscovery, autowire and autoconfigure.

This commit is contained in:
Pol Dellaiera 2021-05-11 21:02:31 +02:00
parent 86dbe527d8
commit ed4f1344c2
2 changed files with 5 additions and 27 deletions

View File

@ -2,6 +2,9 @@ parameters:
# cl_chill_person.example.class: Chill\PersonBundle\Example
services:
_defaults:
autowire: true
autoconfigure: true
chill.person.form.type.select2maritalstatus:
class: Chill\PersonBundle\Form\Type\Select2MaritalStatusType
@ -36,6 +39,4 @@ services:
Chill\PersonBundle\Repository\:
resource: '../Repository/'
arguments:
- '@Doctrine\Persistence\ManagerRegistry'
tags: ['doctrine.repository_service']

View File

@ -2,29 +2,6 @@ services:
chill.person.repository.person:
class: Chill\PersonBundle\Repository\PersonRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments:
- 'Chill\PersonBundle\Entity\Person'
autowire: true
autoconfigure: true
Chill\PersonBundle\Repository\PersonRepository: '@chill.person.repository.person'
Chill\PersonBundle\Repository\AccompanyingPeriod\ClosingMotiveRepository:
class: Chill\PersonBundle\Repository\AccompanyingPeriod\ClosingMotiveRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments:
- 'Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive'
Chill\PersonBundle\Repository\AccompanyingPeriodRepository:
class: Chill\PersonBundle\Repository\AccompanyingPeriodRepository
tags: [ doctrine.repository_service ]
arguments:
- '@Doctrine\Persistence\ManagerRegistry'
Chill\PersonBundle\Repository\AccompanyingPeriodParticipationRepository:
arguments:
- '@Doctrine\Persistence\ManagerRegistry'
tags: [ doctrine.repository_service ]
Chill\PersonBundle\Repository\AccompanyingPeriod\OriginRepository:
arguments:
- '@Doctrine\Persistence\ManagerRegistry'
tags: [ doctrine.repository_service ]