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 explaining queries #802
Conversation
Recent Symfony versions are wrapping the params in a VarDumper Data when collecting the profiler info. This ensures that they get unwrapped properly when trying to explain the query.
Recent means at least 3.4+. I don't remember about older 3.x versions (and I don't have any project using these older unmaintained 3.x versions to test) |
|
||
$params = $query['params']; | ||
|
||
if ($params instanceof Data) { |
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.
Can you create a function with an explicit name and call it in both place ?
@stof Is it possible to add a test for it? |
The proper way to test this in a way making the test strong a regarding changes in the bridge collector would involve building a fake app running some DB query, and having a functional test running a request on this fake app, then opening the profiler, and then trying to explain the query in it (by loading the URL of the partial). This would involve a bunch of work, and I won't have time to work on this during the next few days (and I cannot guarantee it for the next few weeks, even though the French holidays coming in May may give me time for it, but in conflict with other OSS stuff). Is it required to build such test covering the profiler explaining feature for the bug fix to be merged ? |
I will merge in now then. I very much would a test for this if you or someone else find the time to todo it :) |
it is a long running bug, so lets fix it for now and then we can clean up the mess later... @stof Thanks |
Would be great if a release could be made that includes this PR. |
Recent Symfony versions are wrapping the params in a VarDumper Data when collecting the profiler info. This ensures that they get unwrapped properly when trying to explain the query.
Fixes #757