-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DoctrineBridge] Fix issue which prevent the profiler to explain a query #16306
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
d171422
to
7fd30ee
Compare
7fd30ee
to
3b7bb6b
Compare
$c = $this->createCollector($queries); | ||
$c->collect(new Request(), new Response()); | ||
|
||
$collected_queries = $c->getQueries(); |
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.
Should be camel cased: $collectedQueries
.
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.
I just noticed it's also snaked_cased in the other test case. Feel free to fix that one as well.
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.
Fixed it in all testcases
👍 should be merged to 2.3 status: reviewed |
Thank you @Baachi. |
…xplain a query (Baachi) This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #16306). Discussion ---------- [DoctrineBridge] Fix issue which prevent the profiler to explain a query | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT We currently develop a application which only use the doctrine/dbal and not the orm. And we run into a issue that the profiler can't explained any query. This is because the `SQLLogger` will pass `null` instead of an empty array. And the `sanitizeQuery` method will currently transform this to `array(null)` which leads to an error. I created an fork, so everyone can reproduce this. https://github.com/Baachi/symfony-standard Commits ------- 3490e98 [DoctrineBridge] Fix issue which prevent the profiler to explain a query
We currently develop a application which only use the doctrine/dbal and not the orm. And we run into a issue that the profiler can't explained any query.
This is because the
SQLLogger
will passnull
instead of an empty array. And thesanitizeQuery
method will currently transform this toarray(null)
which leads to an error.I created an fork, so everyone can reproduce this.
https://github.com/Baachi/symfony-standard