Skip to content
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

Merged
merged 1 commit into from
Dec 13, 2021
Merged

Conversation

ostrolucky
Copy link
Member

@ostrolucky ostrolucky commented Dec 11, 2021

@@ -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"/>
Copy link
Member

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.

Copy link
Member Author

@ostrolucky ostrolucky Dec 11, 2021

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.

Copy link
Member

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 ?

Copy link
Member Author

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.

@ostrolucky ostrolucky added this to the 2.5.3 milestone Dec 13, 2021
@ostrolucky ostrolucky added the Bug label Dec 13, 2021
@ostrolucky ostrolucky merged commit 913c7bf into 2.5.x Dec 13, 2021
@stof stof deleted the fix-explain branch June 5, 2023 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants