PHPackages                             efrane/console-additions - 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. efrane/console-additions

ActiveLibrary[CLI &amp; Console](/categories/cli)

efrane/console-additions
========================

Helper Classes for Symfony Console

v0.8.1(4mo ago)529.7k↓20%1[5 PRs](https://github.com/eFrane/ConsoleAdditions/pulls)1MITPHPPHP &gt;=8.0,&lt;9CI failing

Since Oct 16Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/eFrane/ConsoleAdditions)[ Packagist](https://packagist.org/packages/efrane/console-additions)[ GitHub Sponsors](https://github.com/eFrane)[ RSS](/packages/efrane-console-additions/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (22)Used By (1)

[![Build Status](https://camo.githubusercontent.com/bb44a1763750f8d8e473869cd159d552ab5d3945e6e619a39fe9cf97b598bb92/68747470733a2f2f7472617669732d63692e6f72672f654672616e652f436f6e736f6c654164646974696f6e732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/eFrane/ConsoleAdditions)[![Latest Stable Version](https://camo.githubusercontent.com/6bb048d227b571dcc565e73667cd240b1ab74aec63ed2f1ef87a26f1e1c69c0b/68747470733a2f2f706f7365722e707567782e6f72672f656672616e652f636f6e736f6c652d6164646974696f6e732f762f737461626c65)](https://packagist.org/packages/efrane/console-additions)[![Latest Unstable Version](https://camo.githubusercontent.com/e4e49520034a8316c6fac1688b6e041aafb3a73d908de53a1e9a6fd8f1f219b9/68747470733a2f2f706f7365722e707567782e6f72672f656672616e652f636f6e736f6c652d6164646974696f6e732f762f756e737461626c65)](https://packagist.org/packages/efrane/console-additions)[![License](https://camo.githubusercontent.com/b9e8326fcac992d9737767d2c6648aa4678a23cebfa8b8658371617d08395a85/68747470733a2f2f706f7365722e707567782e6f72672f656672616e652f636f6e736f6c652d6164646974696f6e732f6c6963656e7365)](https://packagist.org/packages/efrane/console-additions)

Console Additions
=================

[](#console-additions)

Tools to make working with Symfony Console even more awesome.

Installation
------------

[](#installation)

This package is available on [Packagist](https://packagist.org/packages/efrane/console-additions):

```
composer require efrane/console-additions
```

The Additions
-------------

[](#the-additions)

### `Batch`

[](#batch)

This class offers batching commands of a Symfony Console Application. This can be useful when writing things like deployment or update scripts as console commands which call many other commands in a set order e.g. cache updating, database migrations, etc.

Usage in a `Command::execute`:

```
\EFrane\ConsoleAdditions\Command\Batch::create($this->getApplication(), $output)
    ->add('my:command --with-option')
    ->add('my:other:command for-this-input')
    ->run();
```

**Shell Commands**

Batches can be an intertwined set of console application and system shell commands. This is an advanced feature which requires the `symfony/process`package as additional dependency.

Since shell commands internally create `Process` objects, the `Batch` API exposes to methods for adding a shell command:

- `addShell` adds the process with the given configuration (see Batch::addShell for details)
- `addShellCb(string $cmd, callable $cb)` creates the process and passes it to a callback for further configuration. This is especially useful when the desired command requires some kind of process piping.

**Silencing Errors**

It is possible to run a Batch of commands without throwing exceptions.

### Output

[](#output)

This Package offers additional console output interfaces:

#### `FileOutput`

[](#fileoutput)

FileOutputs write all their data to a file stream and come in to concrete flavours:

- `NativeFileOutput` uses the native PHP file streaming functions, thus being a good option for local destinations and depending on your servers PHP streaming protocols configuration it might even suffice for remote destinations.
- `FlysystemFileOutput` on the other hand passes the stream data on to a `league/flysystem`-Adapter, thus being able to send that data to any Flysystem-supported destination, i.e. S3, Dropbox, FTP, etc.

#### `MultiplexedOutput`

[](#multiplexedoutput)

MultiplexedOutput can be used to combine multiple output interfaces to act as one. This is the logical companion of file outputs since usually one would probably want to send the output to the user's console and some other destination. A simple setup inside might look like this:

```
    class Command extends \Symfony\Component\Console\Command {
        public function execute(InputInterface $input, OutputInterface $output) {
            // send output to multiple destinations
            $output = new \EFrane\ConsoleAdditions\Output\MultiplexedOutput([
                $output,
                new \EFrane\ConsoleAdditions\Output\NativeFileOutput('command.log')
            ]);

            // normal console command

        }
    }
```

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance77

Regular maintenance activity

Popularity33

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 78.1% 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

Every ~215 days

Recently: every ~576 days

Total

15

Last Release

125d ago

PHP version history (2 changes)v0.7.0PHP &gt;=7.4,&lt;=8.2

v0.8.0PHP &gt;=8.0,&lt;9

### Community

Maintainers

![](https://www.gravatar.com/avatar/671681f3e2af78795651f1dcbd5df04f36ff526f224a5e59dbc47940d9eb8918?d=identicon)[eFrane](/maintainers/eFrane)

---

Top Contributors

[![eFrane](https://avatars.githubusercontent.com/u/237165?v=4)](https://github.com/eFrane "eFrane (146 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (35 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (5 commits)")[![mussbach](https://avatars.githubusercontent.com/u/57546580?v=4)](https://github.com/mussbach "mussbach (1 commits)")

---

Tags

consolephp-librarysymfonysymfony-consoleconsolesymfonytoolsadditionsfile outputmultiplexed output

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/efrane-console-additions/health.svg)

```
[![Health](https://phpackages.com/badges/efrane-console-additions/health.svg)](https://phpackages.com/packages/efrane-console-additions)
```

###  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)
