<?php

namespace Centipede\Console\Command;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\BrowserKit\Response;
use Centipede\Crawler;

class Run extends Command
{
    private $exitCode = 0;

    protected function configure()
    {
        $this
            ->setName('run')
            ->setDefinition([
                new InputArgument('url', InputArgument::REQUIRED, 'Base url'),
                new InputArgument('depth', InputArgument::OPTIONAL, 'Depth', 1),
            ])
            ->setDescription('Runs specifications')
        ;
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        (new Crawler($input->getArgument('url'), $input->getArgument('depth')))->crawl(function ($url, Response $response) use ($output) {
            $tag = 'info';
            if (200 != $response->getStatus()) {
                $this->exitCode = 1;
                $tag = 'error';
            }

            $output->writeln(sprintf(
                '<%s>%d</%s> %s',
                $tag,
                $response->getStatus(),
                $tag,
                $url
            ));
        });

        return $this->exitCode;
    }
}

<?php

namespace Centipede\Console\Command;

use GuzzleHttp\Message\FutureResponse;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Centipede\Crawler;

class Run extends Command
{
    private $exitCode = 0;

    protected function configure()
    {
        $this
            ->setName('run')
            ->setDefinition([
                new InputArgument('url', InputArgument::REQUIRED, 'Base url'),
                new InputArgument('depth', InputArgument::OPTIONAL, 'Depth', 1),
            ])
            ->setDescription('Runs specifications')
        ;
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        (new Crawler($input->getArgument('url'), $input->getArgument('depth')))->crawl(function ($url, FutureResponse $response) use ($output) {
            $tag = 'info';
            if (200 != $response->getStatusCode()) {
                $this->exitCode = 1;
                $tag = 'error';
            }

            $output->writeln(sprintf(
                '<%s>%d</%s> %s',
                $tag,
                $response->getStatusCode(),
                $tag,
                $url
            ));
        });

        return $this->exitCode;
    }
}

Use a FutureResponse object in the run command
Use a FutureResponse object in the run command

Fixes running centipede. `PHP Catchable fatal error:  Argument 2 passed to Centipede\Console\Command\Run::Centipede\Console\Command\{closure}() must be an instance of Symfony\Component\BrowserKit\Response, instance of GuzzleHttp\Message\FutureResponse given, called in /pipeline/build/vendor/umpirsky/centipede-crawler/src/Centipede/Crawler.php on line 91 and defined in /pipeline/build/vendor/umpirsky/centipede/src/Centipede/Console/Command/Run.php on line 30`