Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Console
✓ use Spiral\Console\Console;
Creates a console application with auto-discovery and runs it
<?php
require_once 'vendor/autoload.php';
use Spiral\Console\Console;
$console = new Console();
$console->addCommand(new class extends \Symfony\Component\Console\Command\Command {
protected static $defaultName = 'hello';
protected function execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output): int
{
$output->writeln('Hello World!');
return 0;
}
});
$console->run();
Debug
Known issues
No known issues recorded.
Upgrade
Version history
3.17.0latest on Packagist
Audit
Dependencies
No dependency data recorded yet.