PHPackages                             exs/terminal-bundle - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. exs/terminal-bundle

ActiveSymfony-bundle[Logging &amp; Monitoring](/categories/logging)

exs/terminal-bundle
===================

Terminal command logging bundle for Symfony2

v1.1.2(9y ago)23.9k1MITPHPPHP &gt;=5.3.2

Since May 15Pushed 9y ago9 watchersCompare

[ Source](https://github.com/ExSituMarketing/EXSTerminalBundle)[ Packagist](https://packagist.org/packages/exs/terminal-bundle)[ Docs](https://github.com/ExSituMarketing/EXSTerminalBundle)[ RSS](/packages/exs-terminal-bundle/feed)WikiDiscussions master Synced today

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

Symfony 2.x TerminalBundle
==========================

[](#symfony-2x-terminalbundle)

Terminal bundle to log all command output regardless of output buffer (echo / print\_r / var\_dump / -&gt;ln()), lock commands to prevent them from running concurrently, provide command stats (pid, runtime, errors) and log any exceptions / errors in the database. Very useful for controlling commands via web interface when commands are being run via cronjob. Handles legacy code that was ported tyo your symfony2 app quick and dirty.

Bundle is installed as a service listening for all exceptions and logging them in the database. Locks use the command alias as the slug for ease of reference. When used in conjunction with a crontab enabled monitor we can then alert the dev team when there are errors, current lock hits, and review the logs via web interface instead of having to login to the particular host that had the problem.

*Options*

```
--output (-o)          Output type (console, db (default: "console")
--lock=true (-l)       Whether or not to lock the console command

```

Installing the TerminalBundle in a new Symfony2 project
-------------------------------------------------------

[](#installing-the-terminalbundle-in-a-new-symfony2-project)

So the TerminalBundle is ready for installation, great news but how do we install it. The installation process is actually very simple. Set up a new Symfony2 project with Composer.

Once the new project is set up, open the composer.json file and add the exs/terminal-bundle as a dependency:

```
//composer.json
//...
"require": {
        //other bundles
        "exs/terminal-bundle": "dev-master"
```

Save the file and have composer update the project via the command line:

```
php composer.phar update
```

Composer will now update all dependencies and you should see our bundle in the list:

```
  - Installing exs/terminal-bundle (dev-master 463eb20)
    Cloning 463eb2081e7205e7556f6f65224c6ba9631e070a
```

Update the app/AppKernel.php and app/config/routing.yml to include our bundle, clear the cache and update the schema:

```
//app/AppKernel.php
//...
    public function registerBundles()
    {
        $bundles = array(
            //Other bundles
            new EXS\TerminalBundle\EXSTerminalBundle()
        );
```

```
#app/config/config.yml
#...
exs_terminal:
    email:
        from: from@test.tld
        to: to@test.tld
        subject: Subject

```

You have to manually update the db with doctrine:schema:update console command.

Migrations won't work because they need the table that they're going to create...

```
php app/console cache:clear
php app/console doctrine:schema:update --force
```

Lastly, copy the including bash file: "runner" from the vendor/exs/terminal-bundle/EXS/TerminalBundle/runner to app/runner That adds the hooks into the original console script without altering the original.

```
cp vendor/exs/terminal-bundle/EXS/TerminalBundle/runner app/runner

```

Make sure you're mailer is properly configurated in config.yml and in parameters.yml:

```
#app/config/config.yml
#...
# Swiftmailer Configuration
swiftmailer:
    transport: "%mailer_transport%"
    host:      "%mailer_host%"
    username:  "%mailer_user%"
    password:  "%mailer_password%"
    spool:     { type: memory }

```

and now you're done.

If you want to test them try opening up the same command in two terminals simultaneously. They currently run for 3 seconds each:

```
php app/runner terminal:test:lock_sleep --lock=true -o=db
php app/runner terminal:test:lock_sleep --lock=true -o=db
```

Once you're run the above command you will be able to verify everything worked by checking the database. The locks and logs will be logged in your database in the following tables:

- terminallogs
- commandlocks

Additionally if your command exited with a non 0 status it likely logged an exception in the exception5xx table.

#### Contributing

[](#contributing)

Anyone and everyone is welcome to contribute.

If you have any questions or suggestions please [let us know](http://www.ex-situ.com/).

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~211 days

Total

4

Last Release

3434d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/af284ff600087e33c35e00252ade1cc1dc3987f969661b91b036254dbe4bbb9c?d=identicon)[rumpranger](/maintainers/rumpranger)

---

Top Contributors

[![rumpranger](https://avatars.githubusercontent.com/u/718301?v=4)](https://github.com/rumpranger "rumpranger (3 commits)")[![damien-qc](https://avatars.githubusercontent.com/u/12374806?v=4)](https://github.com/damien-qc "damien-qc (2 commits)")[![Olineuve](https://avatars.githubusercontent.com/u/1230697?v=4)](https://github.com/Olineuve "Olineuve (1 commits)")

---

Tags

bundleloggingconcurrentexceptionerrorcommandcrontablock

### Embed Badge

![Health badge](/badges/exs-terminal-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/exs-terminal-bundle/health.svg)](https://phpackages.com/packages/exs-terminal-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)

PHPackages © 2026

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