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

Symfony profiler - Doctrine panel - "Explain query" broken #1266

Closed
RealJTG opened this issue Nov 25, 2020 · 3 comments
Closed

Symfony profiler - Doctrine panel - "Explain query" broken #1266

RealJTG opened this issue Nov 25, 2020 · 3 comments

Comments

@RealJTG
Copy link
Contributor

RealJTG commented Nov 25, 2020

Explain feature on Doctrine debug panel panel seems to be broken

Selection_070

GET /_profiler/be783a?panel=db&page=explain&connection=test&query=3
Trace:

TypeError:
Argument 2 passed to Doctrine\Bundle\DoctrineBundle\Controller\ProfilerController::explainSQLServerPlatform() must be of the type string, array given, called in /www/test/vendor/doctrine/doctrine-bundle/Controller/ProfilerController.php on line 66

  at /www/test/vendor/doctrine/doctrine-bundle/Controller/ProfilerController.php:102
  at Doctrine\Bundle\DoctrineBundle\Controller\ProfilerController->explainSQLServerPlatform(object(Connection), array('sql' => 'SELECT COUNT(*) FROM *** WHERE StateID = :dcValue1', 'params' => object(Data), 'types' => array('dcValue1' => 1073741824), 'executionMS' => 0.05746006965637207, 'explainable' => true, 'runnable' => true))
     (/www/test/vendor/doctrine/doctrine-bundle/Controller/ProfilerController.php:66)
  at Doctrine\Bundle\DoctrineBundle\Controller\ProfilerController->explainAction('be783a', 'tools', array('sql' => 'SELECT COUNT(*) FROM *** WHERE StateID = :dcValue1', 'params' => object(Data), 'types' => array('dcValue1' => 1073741824), 'executionMS' => 0.05746006965637207, 'explainable' => true, 'runnable' => true))
...

Version:

"name": "doctrine/doctrine-bundle",
"version": "2.2.1",
"source": {
    "type": "git",
    "url": "https://github.com/doctrine/DoctrineBundle.git",
    "reference": "9e07bb1ff35d35d9ec4597b79e5d05502d7d4d43"
},
@stof
Copy link
Member

stof commented Nov 25, 2020

Looks like the typehint added on explainSQLServerPlatform for $query is wrong. It has been typehinted as string in DoctrineBundle 2, while it is an array (like for the explain methods of other platforms)

@RealJTG
Copy link
Contributor Author

RealJTG commented Nov 25, 2020

Yep, broken here 50c53be
I'll send PR.

RealJTG added a commit to RealJTG/DoctrineBundle that referenced this issue Nov 25, 2020
@ostrolucky ostrolucky modified the milestones: 1.12.13, 2.2.2 Nov 25, 2020
RealJTG added a commit to RealJTG/DoctrineBundle that referenced this issue Nov 25, 2020
RealJTG added a commit to RealJTG/DoctrineBundle that referenced this issue Nov 25, 2020
RealJTG added a commit to RealJTG/DoctrineBundle that referenced this issue Nov 25, 2020
@ostrolucky
Copy link
Member

Will be fixed in 2.2.2

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

3 participants