-
Notifications
You must be signed in to change notification settings - Fork 33
[STALE] Add datacollector for debug #275
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
4a5f7ae to
c3cedff
Compare
f5b0967 to
a128f67
Compare
norkunas
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.
Please rebase and how does it look like in performance tab if you call multiple functions that are traced with stopwatch?
| } | ||
| public function collect(Request $request, Response $response, \Throwable $exception = null): void |
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.
| } | |
| public function collect(Request $request, Response $response, \Throwable $exception = null): void | |
| } | |
| public function collect(Request $request, Response $response, \Throwable $exception = null): void |
| ->addArgument(new Reference('debug.stopwatch')) | ||
| ; |
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.
| ->addArgument(new Reference('debug.stopwatch')) | |
| ; | |
| ->addArgument(new Reference('debug.stopwatch')); |
| $container->setDefinition('meilisearch.service', $searchDefinition->setPublic(true)); | ||
| $container->setAlias('search.service', 'meilisearch.service')->setPublic(true); | ||
|
|
||
| if ($container->getParameter('kernel.debug')) { |
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'd instead introduce debug.xml where you configure these things and import the file if it's debug mode :)
| {% endfor %} | ||
| </div> | ||
| <p class="help"> | ||
| You can also see the HTTP Client & Performance{% if constant('Symfony\\Component\\HttpKernel\\Kernel::VERSION') >= '6.1.0' %} & Serializer{% endif %} tabs to learn more. |
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.
Does the string version comparing really works? Maybe better to use Kernel::VERSION_ID?
|
@norkunas thx for reviewing! edit: not so much free time available lately so PR stale on my side :s |
|
this looks great, I played around with it a little bit and can't wait until it's merged. What's the reason it's blocked? |
|
@tacman it's outdated, needs to be rebased and finished |
|
I don't know much about rebasing using the git commands. But the changes here are mostly new files, plus some small tweaks in registering the services. I can create a new fork from the current main branch(?) with the changes from this PR if that would get it merged. |
👍 do it, I'll review :) |
|
@94noni -- my efforts at giving you the credit you rightly deserve! In fact, I used your code as an template for an unrelated bundle. It's a pain to debug the debugger, but once it works, the Symfony debug toolbar is an amazing tool. |
|
allow me to close here then |
|
@94noni -- I believe it's ready for review! I've only tested it with php 8 and Symfony 7, though |
|
Hello this is indeed relevant i didnt thought about that back then |
|
Indeed, I think there are several things to tweak, I ended up not even using the bundle because my entities aren't in doctrine. |
Pull Request
Related issue
Fixes #268 (target #266 so review only 2nd commit)
What does this PR do?
Feel free to discuss/challenge the implementation/data/design etc
Symfony v5.4
Symfony v6.3