Closed
Description
Q | A |
---|---|
Bug report? | no |
Feature request? | yes |
BC Break report? | no |
RFC? | no |
Symfony version | master |
Following up on #22143, the lack of proper error is solved now in #22185, but the use case for factory
still seems valid:
services:
_defaults:
factory: [ "@doctrine", getRepository ]
AppBundle\RoleRepository:
arguments: [ "AppBundle:Role" ]
AppBundle\UserRepository:
arguments: [ "AppBundle:User" ]
It was decided in #21071 (comment) to consider the factory
attribute a detector flag for real services, but this has become obsolete, and the use case for default factory settings is there.
Therefore I propose to reallow factory
in _defaults
sections.