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

Explain query doesn't work with Symfony 6 #1442

Closed
HypeMC opened this issue Dec 5, 2021 · 0 comments
Closed

Explain query doesn't work with Symfony 6 #1442

HypeMC opened this issue Dec 5, 2021 · 0 comments

Comments

@HypeMC
Copy link
Contributor

HypeMC commented Dec 5, 2021

The Explain query button in the profiler doesn't work with Symfony 6:

image

If I open the URL directly, e.g. /_profiler/248883?panel=db&page=explain&connection=default&query=1 I get the following error:

An exception has been thrown during the rendering of a template ("The "twig" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.").

The problem is that the ProfilerController tries to fetch the twig service directly from the container, but in Symfony 6 the service is private:

return new Response($this->container->get('twig')->render('@Doctrine/Collector/explain.html.twig', [

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants