Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Console] CommandTester doesn't set the executed command's name #8625

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
xabbuh opened this issue Aug 1, 2013 · 1 comment
Closed

[Console] CommandTester doesn't set the executed command's name #8625

xabbuh opened this issue Aug 1, 2013 · 1 comment
Labels

Comments

@xabbuh
Copy link
Member

xabbuh commented Aug 1, 2013

The default input definition of the Console Component requires a command argument (s. Symfony\Component\Console\Application::getDefaultInputDefinition()). When you try to execute a command which has no arguments using the CommandTester you have to pass a command argument (with an arbitrary value) (s. example Gist). Otherwise, you receive a RuntimeException (see also symfony/symfony-docs#2870):

RuntimeException: Not enough arguments in Symfony\Component\Console\Input\Input on line 76
@dlondero
Copy link
Contributor

+1 Experiencing this on a 2.2.1. In the cookbook there's no more command in the arguments array, while in the component documentation there is...

fabpot added a commit that referenced this issue Sep 30, 2013
… the application (xabbuh)

This PR was submitted for the 2.2 branch but it was merged into the master branch instead (closes #8626).

Discussion
----------

[Console] pass command name automatically if required by the application

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8625
| License       | MIT
| Doc PR        |

Commits
-------

50c8050 [Console] pass command name automatically if required by the application
@fabpot fabpot closed this as completed Sep 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants