-
-
Notifications
You must be signed in to change notification settings - Fork 460
Fix type error #984
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 type error #984
Conversation
Weird… can you provide the full stack trace? I think a better fix might be to ensure |
To be clear: this should be fixed in sf bridge, right? |
I'll provide stacktrace next week. |
I have no idea, but a stack trace might help with this ;) |
Here you go:
|
Ok so if I understand correctly, the data comes from an HTTP request, which probably should have more data. Can you have look at the POST/GET data and the body of the request that fails? |
That's a GET request when clicking on explain.
|
Oh query is just an integer, and it looks like I misread, queries come from |
Yes, so fix should go to symfony bridge then, i'll make a new PR. |
Looking deeper I found that DBAL DebugStack logger has this: |
🤔 weird… |
I thought the same. What should we do? 🙂 |
We should determine what's the earliest place where we can use an empty array without breaking things. Changing that signature would be a BC-break, so that will not be it, but maybe checks could be added in that function to change |
https://github.com/symfony/symfony/blob/4.4/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php#L141 I think this should be the place as there is params normalization |
I agree, this looks like a good place to do this! |
This PR was merged into the 3.4 branch. Discussion ---------- [DoctrineBridge] Fix type error | Q | A | ------------- | --- | Branch? | 3.4 <!-- see below --> | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | - <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | - <!-- required for new features --> See discussion here: doctrine/DoctrineBundle#984 > Having SET sql_mode=(SELECT REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY', '')) query and when clicking on explain currently it throws: > Argument 2 passed to Doctrine\DBAL\Connection::resolveParams() must be of the type array, null given, called in /vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php on line 911 <!-- Replace this notice by a short README for your feature/bugfix. This will help people understand your PR and can be used as a start for the documentation. Additionally (see https://symfony.com/roadmap): - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against branch 4.4. - Legacy code removals go to the master branch. --> Commits ------- 7b8ee3e Fix type error
Having
SET sql_mode=(SELECT REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY', ''))
query and when clicking on explain currently it throws:Argument 2 passed to Doctrine\DBAL\Connection::resolveParams() must be of the type array, null given, called in /vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php on line 911