LeezyPheanstalkBundle icon indicating copy to clipboard operation
LeezyPheanstalkBundle copied to clipboard

Missing something after requiring package? im using symfony 4

Open Kevin-Roger opened this issue 5 years ago • 0 comments

Here is the context:

Installed beanstalk bundle with composer "composer require leezy/pheanstalk-bundle"

I'm trying to using inside a command but i get this error

Cannot autowire service "App\Command\Worker\ProcessParserCommand": argument "$pheanstalk" of method "__construct()" references interface "Pheanstalk\Contract\PheanstalkInterface" but no such service exists. You should maybe alias this interface to the existing "leezy.pheanstalk.proxy.default" service.


class ProcessParserCommand extends Command
{
    protected static $defaultName = 'app:worker:process-parser';

    /** @var PheanstalkInterface $pheanstalk */
    private $pheanstalk;

    protected function configure()
    {
        $this
            ->setDescription("Parse something")
        ;
    }



    public function __construct(PheanstalkInterface $pheanstalk)
    {
        $this->pheanstalk=$pheanstalk;

        parent::__construct();
    }
}

Kevin-Roger avatar Dec 16 '19 18:12 Kevin-Roger