Skip to content

[Console] "Building a Single Command Application" solution is not usable for commands with arguments #2290

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
eugene-dounar opened this issue Mar 9, 2013 · 1 comment

Comments

@eugene-dounar
Copy link

The solution proposed in
http://symfony.com/doc/2.2/components/console/single_command_tool.html
does not work if the command accepts an argument.

test.php arg1 

will throw RuntimeException "Not enough arguments".

I'm not sure if this should be fixed or described in the docs.

@eugene-dounar
Copy link
Author

Ok, I figured out that it's just about overriding getDefinition(). I guess this should be mentioned in the docs.

weaverryan added a commit that referenced this issue Mar 21, 2013
[#2290] Single command apps with arguments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants