selamlar..laravel dışında composer yardımıyla symfony console unu kullanarak bir projem var..ancak console icin stillendirme yapmak istedigimde..symfony bana sunu kullandırtıyor
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class GreetCommand extends ContainerAwareCommand
{
// ...
protected function execute(InputInterface $input, OutputInterface $output)
{
$io = new SymfonyStyle($input, $output);
$io->title('Lorem Ipsum Dolor Sit Amet');
// ...
}
}
resolvelerimde sorun yok..her türlü sınıfı binding yapabiliyorum ancak..Interface bir sınıfı çözemiyorum..sebebi ne olabilir sizce? hata aşağıdaki gibi..
PHP Fatal error: Uncaught exception 'DI\Definition\Exception\DefinitionException' with message 'Entry "\src\commands\test" cannot be resolved: Entry "Symfony\Component\Console\Input\InputInterface" cannot be resolved: the class is not instantiable
Full definition:
Object (
class = #NOT INSTANTIABLE# Symfony\Component\Console\Input\InputInterface
scope = singleton
lazy = false
)
Full definition:
Object (
class = \src\commands\test
scope = singleton
lazy = false
__construct(
$input = get(Symfony\Component\Console\Input\InputInterface)
)
)' in /var/www/public/apix/vendor/php-di/php-di/src/DI/Definition/Exception/DefinitionException.php:16