Skip to content
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

single command applications with arguments #41

Open
glensc opened this issue Sep 9, 2017 · 4 comments
Open

single command applications with arguments #41

glensc opened this issue Sep 9, 2017 · 4 comments

Comments

@glensc
Copy link
Contributor

glensc commented Sep 9, 2017

while single command applications are possible with setDefaultCommand:

$app->command('run', /* ... */);
$app->setDefaultCommand('run');

http://mnapoli.fr/silly/docs/command-definition.html

implemented (suggested) via: #30

it doesn't play well when you want to use arguments (not options), as that would require that you specify command name before first argument.

@glensc
Copy link
Contributor Author

glensc commented Sep 9, 2017

done some research,

seems it's possible to solve this, but seems the secotnd argument to setDefaultCommand
requires symfony/console 3.2

for older versions it's possible too, but a bit more complex.

neither of these is documented in http://mnapoli.fr/silly/docs/command-definition.html and doesn't mention problem with non-option arguments

@mnapoli
Copy link
Owner

mnapoli commented Sep 14, 2017

Good point. I'd like to avoid the workaround for Symfony < 3.2 though. And upgrading to 3.2 is maybe a bit early?

@glensc
Copy link
Contributor Author

glensc commented Sep 14, 2017

i think documenting and proposing application to use 3.2 is sufficient. this library shouldn't require newer symfony (that is not base functionality). and pointing to documentation how to use in older version.

yeah probably just putting my comment into docs:
#41 (comment)

@mnapoli
Copy link
Owner

mnapoli commented Sep 14, 2017

👍 then feel free to send a pull request to add that to the docs that would be perfect!

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