for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Spiral\Console;
use Spiral\Core\Attribute\Scope as ScopeAttribute;
use Spiral\Core\CoreInterface;
use Spiral\Core\InvokerInterface;
use Spiral\Interceptors\Context\CallContext;
use Spiral\Interceptors\HandlerInterface;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
#[ScopeAttribute('console.command')]
final class CommandCore implements CoreInterface, HandlerInterface
Spiral\Core\CoreInterface
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation
ignore-deprecated
final class CommandCore implements /** @scrutinizer ignore-deprecated */ CoreInterface, HandlerInterface
This interface has been deprecated. The supplier of the interface has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the interface will be removed and what other interface to use instead.
{
public function __construct(
private readonly InvokerInterface $invoker,
) {
}
/**
* @param array{input: InputInterface, output: OutputInterface, command: Command}|array $parameters
*/
public function callAction(string $controller, string $action, array $parameters = []): int
$command = $parameters['command'];
return (int)$this->invoker->invoke([$command, $action]);
public function handle(CallContext $context): int
$callable = $context->getTarget()->getCallable() ?? throw new \RuntimeException('Command action not found');
return (int)$this->invoker->invoke($callable, $context->getArguments());
This interface has been deprecated. The supplier of the interface has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the interface will be removed and what other interface to use instead.