You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i run the command i get a error message: [Symfony\Component\Debug\Exception\ContextErrorException]
Warning: Missing argument 1 for BackendBundle\Service\Importer::__construct(), called in /mnt/sdc/www/mysite/htdocs/var/cache/dev/appDevDebugProjectContainer.php on line 558 and defined
If i don't get the "app.importer" service the error message is gone. Shouldn't this work? Or am i missing something?
The text was updated successfully, but these errors were encountered:
I've created a command with the following code:
`use JMS\DiExtraBundle\Annotation as DI;
/**
@di\Service("app.importer.command", public=true)
@di\Tag(name="console.command")
*/
class ImportCommand extends ContainerAwareCommand
{
protected function execute(InputInterface $input, OutputInterface $output)
{
$cityId = $input->getOption('city');
$importer = $this->getContainer()->get("app.importer");
}
}`
the "app.importer" is a service i declared using annotations like that:
`use JMS\DiExtraBundle\Annotation as DI;
/**
@di\Service("app.importer", public=true)
*/
class Importer
{
/*
*/
public function __construct($client, $key, $doctrine, $fileDownloader)
{
$this->client = $client;
$this->key = $key;
$this->doctrine = $doctrine;
$this->fileDownloader = $fileDownloader;
}
...
}`
when i run the command i get a error message: [Symfony\Component\Debug\Exception\ContextErrorException]
Warning: Missing argument 1 for BackendBundle\Service\Importer::__construct(), called in /mnt/sdc/www/mysite/htdocs/var/cache/dev/appDevDebugProjectContainer.php on line 558 and defined
If i don't get the "app.importer" service the error message is gone. Shouldn't this work? Or am i missing something?
The text was updated successfully, but these errors were encountered: