-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DependencyInjection][FrameworkBundle] Fix precedence of App\Kernel
alias and ignore container.excluded
tag on synthetic services
#60392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
App\Kernel
alias and ignore container.excluded
tag on synthetic services
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php
Show resolved
Hide resolved
5c475e1
to
d8d9e92
Compare
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
Outdated
Show resolved
Hide resolved
…lias and ignore container.excluded tag on synthetic services
d8d9e92
to
023c44c
Compare
Hello @nicolas-grekas ,
|
@adpeyre I don't know, please provide a reproducer in a new issue if you can (I installed doctrine-bundle with Symfony 7.3 successfully, which means I cannot reproduce). |
Note that this error message is not found anywhere in Symfony 7.3 so I'm skeptical. |
I think the person in my team hasn't updated their symfony properly to test 7.3.... This appears to be symfony 7.2 code... Sorry Nicolas. |
Autoconfiguration cannot make a service abstract so I'm removing the related calls, they're confusing.
Then, I'm moving the definition of the
App\Kernel
alias after loadingservices.yaml
, so that the alias overrides the discovered corresponding class.And I make instance-of-conditionals ignore
container.excluded
tags on synthetic services. An alternative could be to check if the class implementsKernelInterface
like proposed in #60191 (comment) but I think the rule I'm proposing here is more generic.