This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Console/Tests
Fabien Potencier e85ab46b17 feature #9235 [Console] Skip commands from ConsoleCommandEvent (tPl0ch)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Console] Skip commands from ConsoleCommandEvent

Use case: We have different variations of the same application, for which
only certain commands are allowed. Right now this is done in a custom
Application class, but it would be much easier to just be able to skip
commands from a listener, where you can disable commands via the Event
object.

This patch provides this feature and corresponding test cases.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes - for Console tests
| Fixed tickets | None
| License       | MIT
| Doc PR        | symfony/symfony-docs#4058

Commits
-------

acb1ae6 [Console] Skip commands from ConsoleCommandEvent
2014-08-31 06:11:39 +02:00
..
Command fixed CS 2014-07-29 20:09:11 +02:00
Descriptor [Console] made descriptors use output instead of returning a string 2013-07-31 15:28:38 +02:00
Fixtures [Console] Roll back changes made to fixture files. 2014-07-31 21:49:10 +01:00
Formatter Merge branch '2.4' into 2.5 2014-08-14 18:10:54 +02:00
Helper feature #11346 [Console] ProgressBar developer experience (stefanosala, gido) 2014-08-27 15:03:54 +02:00
Input Merge branch '2.2' into 2.3 2013-09-13 14:20:37 +02:00
Logger [Console] Added standalone PSR-3 compliant logger 2014-03-19 16:21:15 +01:00
Output Merge branch '2.4' into 2.5 2014-07-08 14:21:33 +02:00
Tester [Console] added some tests for previous merge (refs #8626) 2013-09-30 21:59:36 +02:00
ApplicationTest.php [Console] Skip commands from ConsoleCommandEvent 2014-07-25 11:21:17 +02:00