PHPackages                             rikby/symfony-command-collector - 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. rikby/symfony-command-collector

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

rikby/symfony-command-collector
===============================

Small script for extending symfony command for collecting symfony sub-commands.

v0.1.0(9y ago)017GPL-3.0PHP

Since Sep 22Pushed 9y ago1 watchersCompare

[ Source](https://github.com/rikby/symfony-command-collector)[ Packagist](https://packagist.org/packages/rikby/symfony-command-collector)[ RSS](/packages/rikby-symfony-command-collector/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (2)Used By (0)

Symfony console commands collector
==================================

[](#symfony-console-commands-collector)

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

[](#installation)

Just run in your project:

```
composer require rikby/symfony-command-collector ^0.1.0@stable

```

First steps
-----------

[](#first-steps)

There is a code which could help you to merge sub-commands from different places.

Let's admit we have command `super` which is an enter-point for our console commands.

`super` has sub-commands `sub1` and `sub2`.

We have packages which could extend this command. There two sub-commands in two packages.

```
bin/
    .autoload-init.php
    super
src/
    SubOneCommand.php
    SubTwoCommand.php
vendor/
    my-vendor/
        pack111/
            bin/super-app-include.php
            src/FooCommand.php
        pack222/
            bin/super-app-include.php
            src/BarCommand.php
composer.json

```

Content of `bin/super`

```
#!/usr/bin/env php
