PHPackages                             fezfez/symfony-console-di - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. fezfez/symfony-console-di

Abandoned → [fezfez/symfony-console-di](/?search=fezfez%2Fsymfony-console-di)Library[CLI &amp; Console](/categories/cli)

fezfez/symfony-console-di
=========================

Use symfony console with DI

0.1.0(10y ago)43.8k1PHP

Since Feb 9Pushed 5y ago3 watchersCompare

[ Source](https://github.com/fezfez/symfony-console-di)[ Packagist](https://packagist.org/packages/fezfez/symfony-console-di)[ Docs](https://github.com/fezfez/symfony-console-di)[ RSS](/packages/fezfez-symfony-console-di/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

symfony-console-di
==================

[](#symfony-console-di)

[![Build Status](https://camo.githubusercontent.com/5c93ab4ccd383a768a0b0b8970989a8b36b101db7a8d1e44fd66649ae4520e24/68747470733a2f2f7472617669732d63692e6f72672f66657a66657a2f73796d666f6e792d636f6e736f6c652d64692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/fezfez/symfony-console-di)[![Code Coverage](https://camo.githubusercontent.com/028c33ac5936f410715738597488c3f9bd3fc5d1f7eaa909305c90ec9294c0d5/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f66657a66657a2f73796d666f6e792d636f6e736f6c652d64692f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/fezfez/symfony-console-di/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/da4e81eda70d1a20e87873add7e6caaaba654347e9f41a3fb27edc47f2f8120b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f66657a66657a2f73796d666f6e792d636f6e736f6c652d64692f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/fezfez/symfony-console-di/?branch=master)

Symfony console with dependency injection capability and lazy loading

Sample
------

[](#sample)

```
use Fezfez\SymfonyDiConsole\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class ACommand implements Command
{
    private string $dependency;

    public function __construct(string $dependency)
    {
        $this->dependency = $dependency;
    }

    public function execute(InputInterface $input, OutputInterface $output): int
    {
        $output->write($this->dependency . 'hola' . $input->getArgument('hi') . $input->getOption('anoption'));

        return 1;
    }
}
```

```
use Fezfez\SymfonyDiConsole\Command;
use Fezfez\SymfonyDiConsole\CommandDefinition;
use Fezfez\SymfonyDiConsole\CommandFactory;
use Psr\Container\ContainerInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;

class TestCommandFactory implements CommandFactory
{
    public function createCommand(ContainerInterface $container): Command
    {
        echo 'Not call !';
        return new ACommand('hola');
    }

    public function configure(): CommandDefinition
    {
        echo 'call !';
        $dto = new CommandDefinition('test', 'this is a sample');
        $dto->addArgument(new InputArgument('hi'));
        $dto->addOption(new InputOption('anoption'));

        return $dto;
    }
}
```

```
$application = new Application('My app');
$application->add(CommandBuilder::build(TestCommandFactory::class, $container));
$application->run();
// output : call !
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3745d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2aacc30f852e940d49eaf76c0cac6a97f3cfe4d38692ea774a57bc634196bda9?d=identicon)[fezfez](/maintainers/fezfez)

---

Top Contributors

[![fezfez](https://avatars.githubusercontent.com/u/1162307?v=4)](https://github.com/fezfez "fezfez (10 commits)")

---

Tags

consolesymfonydi

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fezfez-symfony-console-di/health.svg)

```
[![Health](https://phpackages.com/badges/fezfez-symfony-console-di/health.svg)](https://phpackages.com/packages/fezfez-symfony-console-di)
```

###  Alternatives

[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.6k331.8M8.5k](/packages/nunomaduro-collision)[matthiasnoback/symfony-console-form

Use Symfony forms for Console command input

368264.8k8](/packages/matthiasnoback-symfony-console-form)[contributte/console

Best Symfony Console for Nette Framework

983.6M49](/packages/contributte-console)[coresphere/console-bundle

This bundle allows you accessing the symfony2 console via your browser

146337.3k5](/packages/coresphere-console-bundle)[contributte/console-extra

Nette-based console commands for latte, DIC, security, utils and many others

301.2M2](/packages/contributte-console-extra)[phlib/console-process

Console implementation.

1833.5k2](/packages/phlib-console-process)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
