alanvdb/symfony-console-application

Console application based on symfony/console library.

v1.1 2025-06-15 15:48 UTC

This package is auto-updated.

Last update: 2025-06-15 15:50:18 UTC


README

Console application based on symfony/console library.

Latest Version License PHP Version

Overview

Features

Requirements

  • alanvdb/console-application-interface ^1.0

Installation

composer require alanvdb/symfony-console-application

Usage

Here is an example of how to use symfony-console-application:

require 'vendor/autoload.php';

use AlanVdb\Console\SymfonyConsoleApplication;

$instance = new SymfonyConsoleApplication(
    'MyApp',
    '1.0',
    \My\Command::class // must implement AlanVdb\Console\Definition\CommandInterface
);

Factory pattern :

require 'vendor/autoload.php';

use AlanVdb\Console\Factory\SymfonyConsoleApplicationFactory;

$factory = new SymfonyConsoleApplicationFactory();
$instance = $factory->createConsoleApplication(
    'MyApp',
    '1.0',
    \My\Command::class // must implement AlanVdb\Console\Definition\CommandInterface
);

License

This project is licensed under the MIT License. See the MIT license file for details.