Skip to content

dump in profiler #10

@oscarpedrero

Description

@oscarpedrero

@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;
    }

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions