Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
Open
Description
Symfony version(s) affected
all
Description
Can somebody review or explain why AttributeAutoconfigurationPass (resp.$container->registerAttributeForAutoconfiguration
) ignore abstract definitions?
symfony/src/Symfony/Component/DependencyInjection/Compiler/AttributeAutoconfigurationPass.php
Line 87 inc0c0a8f
||$value->isAbstract()
Bypassed solution is to use:
- #AutoconfigureTag or #Autoconfigure where abstract definition are not ignored.
So why it mattes with AttributeAutoconfigurationPass?
How to reproduce
- Tag some service with custom tag
- Make service abstract in definition
- in e.g. Kernel build() call $container->registerAttributeForAutoconfiguration for this custom tag
Possible Solution
Remove isAbstract condition from
symfony/src/Symfony/Component/DependencyInjection/Compiler/AttributeAutoconfigurationPass.php
Line 87 inc0c0a8f
||$value->isAbstract() |
Additional Context
No response