-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
Fix ProfilerController compatibility with Symfony 6 #1447
Conversation
b44a583
to
4aac5cb
Compare
@@ -233,5 +233,13 @@ | |||
|
|||
<tag name="console.command" command="doctrine:mapping:import" /> | |||
</service> | |||
|
|||
<service id="Doctrine\Bundle\DoctrineBundle\Controller\ProfilerController"> | |||
<argument type="service" id="twig" on-invalid="ignore"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on-invalid="ignore"
is wrong, as the class cannot be instantiated without that argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And that's fine, I don't want that controller instantiated without those arguments, as it would be useless. It cannot work without them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but why adding this on-invalid="ignore"
then ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because twig
and profiler
are registered only in certain configurations, as discovered by tests.
4aac5cb
to
1f853a0
Compare
#1442