Registry / cli / symfony-console

symfony-console

JSON →
library8.1.0phppackagistunverified

Eases the creation of beautiful and testable command line interfaces

composer require symfony/console
INSTALL
IMPORT
SIG · SYMFONY-CONSOLE
S
symfony-console
cliphpv8.1.0
harness data pending
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.

Application
use Symfony\Component\Console\Application;

Creating a CLI application with Symfony Console

use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; $app = new Application(); $app->add(new class extends Command { protected function configure(): void { $this->setName('hello'); } protected function execute(InputInterface $input, OutputInterface $output): int { $output->writeln('Hello World'); return Command::SUCCESS; } }); $app->run();
Debug
Known issues
breakingSymfony Console 8.x requires PHP 8.2+ and drops support for older event dispatcher interfaces
fix
Update event listeners to use new Symfony 8 event system
affects: >=8.0.0
Upgrade
Version history
8.1.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
22
OpenAI (training)
1
Resources
symfony-console — pip install symfony-console · libregistry