-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[DoctrineBridge] Improve queries parameters display in Profiler #34384
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c81ca71 to
5018f45
Compare
Member
nicolas-grekas
left a comment
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.
Nice, just minor comments.
src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php
Outdated
Show resolved
Hide resolved
Member
|
Oh, please check tests on Windows, they fail. |
5018f45 to
0de1c78
Compare
Contributor
Author
|
@nicolas-grekas CI is green but I had to disable colors for the cli dumper for Windows. |
nicolas-grekas
approved these changes
Nov 15, 2019
stof
reviewed
Nov 15, 2019
stof
reviewed
Nov 15, 2019
0de1c78 to
9c5bb11
Compare
src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php
Outdated
Show resolved
Hide resolved
9c5bb11 to
fe15f51
Compare
fabpot
approved these changes
Nov 17, 2019
Member
|
Thank you @fancyweb. |
fabpot
added a commit
that referenced
this pull request
Nov 17, 2019
…filer (fancyweb) This PR was merged into the 4.4 branch. Discussion ---------- [DoctrineBridge] Improve queries parameters display in Profiler | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | #34234 | License | MIT | Doc PR | - ## Stringable object: _The query is runnable._ ### Before <img width="773" alt="Screenshot 2019-11-14 at 21 05 53" src="https://user-images.githubusercontent.com/3658119/68892948-669cf180-0724-11ea-889b-8ce781956fc7.png"> ### After <img width="780" alt="Screenshot 2019-11-14 at 20 56 38" src="https://user-images.githubusercontent.com/3658119/68892978-787e9480-0724-11ea-843b-70a595633192.png"> ## Non stringable object: _Exception, the query is not runnable._ ### Before <img width="783" alt="Screenshot 2019-11-14 at 21 05 31" src="https://user-images.githubusercontent.com/3658119/68892993-80d6cf80-0724-11ea-9961-e32b65f81508.png"> ### After <img width="622" alt="Screenshot 2019-11-14 at 20 57 17" src="https://user-images.githubusercontent.com/3658119/68893007-87fddd80-0724-11ea-98cb-2ef695135673.png"> ## Error with an object: _`ConversionException` or a `\TypeError` when you specify the type when you set the parameter but you provide an invalid value and this value is an object (eg `->setParameter('foo', new \stdClass(), 'date')`), the query is not runnable._ ### Before <img width="775" alt="Screenshot 2019-11-14 at 21 04 45" src="https://user-images.githubusercontent.com/3658119/68893078-a9f76000-0724-11ea-9e9a-bb806ffa0a73.png"> ### After <img width="821" alt="Screenshot 2019-11-14 at 20 59 23" src="https://user-images.githubusercontent.com/3658119/68893098-b24f9b00-0724-11ea-8e9d-7179725b8bc1.png"> ## Error with anything else: _`ConversionException` or a `\TypeError` when you specify the type when you set the parameter but you provide an invalid value and this value is not an object (eg `->setParameter('foo', 'bar', 'date')`), the query is not runnable._ ### Before <img width="809" alt="Screenshot 2019-11-14 at 21 05 10" src="https://user-images.githubusercontent.com/3658119/68893031-93e99f80-0724-11ea-9c23-f8d05f2dbfbb.png"> ### After <img width="832" alt="Screenshot 2019-11-14 at 20 57 54" src="https://user-images.githubusercontent.com/3658119/68893055-9d730780-0724-11ea-8ce1-a7b8946aaf94.png"> The new `runnable` key will be used in `DoctrineBundle` profiler template to hide the `View runnable query` link when the query is not runnable. Commits ------- fe15f51 [DoctrineBridge] Improve queries parameters display in Profiler
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stringable object:
The query is runnable.
Before
After
Non stringable object:
Exception, the query is not runnable.
Before
After
Error with an object:
ConversionExceptionor a\TypeErrorwhen you specify the type when you set the parameter but you provide an invalid value and this value is an object (eg->setParameter('foo', new \stdClass(), 'date')), the query is not runnable.Before
After
Error with anything else:
ConversionExceptionor a\TypeErrorwhen you specify the type when you set the parameter but you provide an invalid value and this value is not an object (eg->setParameter('foo', 'bar', 'date')), the query is not runnable.Before
After
The new
runnablekey will be used inDoctrineBundleprofiler template to hide theView runnable querylink when the query is not runnable.