We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@adrienbrault first of all amazing work!!!
I have a little doubt, is there any way to make the dump() go out through the profiler?
Thank you so much!
<?php namespace App\Command; use Sourceability\Instrumentation\Profiler\ProfilerInterface; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class PagerFantaCommand extends Command { /** * @var ProfilerInterface */ private $profiler; public function __construct(ProfilerInterface $profiler) { parent::__construct(); $this->profiler = $profiler; } protected function configure() { $this ->setName('app:pager:fanta'); } protected function execute(InputInterface $input, OutputInterface $output): int { $this->profiler->start('pagerFanta'); dump('hi world!'); $this->profiler->stop(); return 0; } }
The text was updated successfully, but these errors were encountered:
I think I tracked down what is preventing the profiler from handling/collecting dumps on the CLI.
After adding the following code to my \Symfony\Component\HttpKernel\Kernel::build method:
\Symfony\Component\HttpKernel\Kernel::build
$container->addCompilerPass(new class() implements CompilerPassInterface { public function process(ContainerBuilder $container): void { if ($container->hasDefinition('debug.dump_listener')) { $container->removeDefinition('debug.dump_listener'); } } });
I no longer see dump() print anything on the cli, but I do see the dumps in the toolbar/profile.
dump()
Could you try this hack/workaround and let me know if does what you're after? I'm not quite sure yet how to best approach this
Sorry, something went wrong.
That's the functionality I'm looking for.
Searching in google I have come to this article https://smaine-milianni.medium.com/how-to-disable-the-listeners-in-symfony-3d30de1d6929 in which they explain how to deactivate an event, maybe it will guide you a little on how to address this topic.
No branches or pull requests
@adrienbrault first of all amazing work!!!
I have a little doubt, is there any way to make the dump() go out through the profiler?
Thank you so much!
The text was updated successfully, but these errors were encountered: