PHPackages                             lesser-evil/shell-verbosity-is-evil - 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. lesser-evil/shell-verbosity-is-evil

ActiveLibrary

lesser-evil/shell-verbosity-is-evil
===================================

v1.0.0(3y ago)186.3k—9.2%4MITPHP

Since Nov 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/totten/shell-verbosity-is-evil)[ Packagist](https://packagist.org/packages/lesser-evil/shell-verbosity-is-evil)[ RSS](/packages/lesser-evil-shell-verbosity-is-evil/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (4)

Shell Verbosity is Evil
=======================

[](#shell-verbosity-is-evil)

The `SHELL_VERBOSITY` environment variable was introduced in `symfony/console` 3.4 and still appears in `symfony/console` 6.2. It defines a gooey, sticky form of verbosity.

The theory seems to be: if you call a command in verbose mode (`-v`), and if it calls any subcommands, then all those subcommands should also run in verbose mode. I suppose this is OK if the various commands follow simple, sequential procedures with outputs shown to a human.

But this convention is actively harmful when programs are *composed* in Unix-style. For simplicity, consider a Symfony Console command (`snafu`) which invokes a subcommand:

```
class SnafuCommand extends Command {
  public function execute(...) {
    shell_exec('find_data | filter_data > /tmp/my_data.json');
    $data = json_decode(file_get_contents('/tmp/my_data.json'));
  }
}
```

If you call `snafu -v`, then Symfony surrepetitiously sets `SHELL_VERBOSITY=1` and propagates it to each subprocess. So `filter_data` receives `SHELL_VERBOSITY=1` and begins outputting a processing log -- in addition to its regular JSON output. Now, the file `/tmp/my_data.json` is no longer JSON -- it is JSON plus random noise. So anything reading `my_data.json` will break.

The overall effect is to make the system flaky. Any Symfony-based command can cause this problem (by setting `SHELL_VERBOSITY`) or become broken by it (by accepting `SHELL_VERBOSITY`). If something breaks, you have to trawl the process-graph to find the two parties to the breakage. The breakage only happens when running `snafu -v`. If you run commands individually, or if you run `snafu` normally, then it works -- which will confound debugging efforts.

Of course, the reason to use `-v` is to debug something. If `-v` itself causes another bug, then you're investigating the combined behavior of two bugs.

How to remove SHELL\_VERBOSITY
------------------------------

[](#how-to-remove-shell_verbosity)

Friends don't let friends use `SHELL_VERBOSITY`. This repo defines an adapter to kill `SHELL_VERBOSITY`.

```
composer require lesser-evil/shell-verbosity-is-evil

```

In Symfony 3.4 - 6.2, the `SHELL_VERBOSITY` behavior is defined by `Application::configureIO()`. Override this:

```
use LesserEvil\ShellVerbosityIsEvil;

class MyApplication extends Application {
  protected function configureIO(InputInterface $input, OutputInterface $output) {
    ShellVerbosityIsEvil::doWithoutEvil(function() use ($input, $output) {
      parent::configureIO($input, $output);
    });
  }
}
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity46

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

1293d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1336047?v=4)[Tim Otten](/maintainers/totten)[@totten](https://github.com/totten)

---

Top Contributors

[![totten](https://avatars.githubusercontent.com/u/1336047?v=4)](https://github.com/totten "totten (1 commits)")

### Embed Badge

![Health badge](/badges/lesser-evil-shell-verbosity-is-evil/health.svg)

```
[![Health](https://phpackages.com/badges/lesser-evil-shell-verbosity-is-evil/health.svg)](https://phpackages.com/packages/lesser-evil-shell-verbosity-is-evil)
```

PHPackages © 2026

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