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

Use a real option parser #36

Open
jaz303 opened this issue Dec 21, 2013 · 10 comments
Open

Use a real option parser #36

jaz303 opened this issue Dec 21, 2013 · 10 comments

Comments

@jaz303
Copy link
Owner

jaz303 commented Dec 21, 2013

When I originally wrote phake I hand-rolled the command line option parser because PHP's getopt functions were useless and the only alternative was to pull in half of PEAR to get access to a better one. However, we're now living in the age of Composer/Packagist, and a cursory search showed there to be a number of independently maintained possible alternatives.

What are everyone's thoughts about switching to a more robust option parser? Does anybody have a preferred package?

@clue
Copy link
Collaborator

clue commented Dec 21, 2013

thoughts about switching to a more robust option parser?

+1

This will big a big step towards addressing #32.

Does anybody have a preferred package?

Not yet, but I'll see I can come up with a lightweight alternative.

@lalop
Copy link

lalop commented Apr 22, 2014

what about using the symfony console component for input/output ?

@jaz303
Copy link
Owner Author

jaz303 commented Apr 22, 2014

As long as it's modular/lightweight I'm all for it. I'll check it out

@lalop
Copy link

lalop commented Apr 22, 2014

That cans be a good things.
And permit to easily add helpers like that http://symfony.com/doc/current/components/console/helpers/index.html

Open to help one this point, just ping me.

@sagikazarmark
Copy link

IMO Symfony Console is everything, but not lightview.

First of all: option parsing and the things called InputInterface and OutputInterface are not the same.

BTW "output": I prefer CLImate these days.

@sagikazarmark
Copy link

@sagikazarmark
Copy link

or this:
https://github.com/nategood/commando

@sagikazarmark
Copy link

or this:
https://github.com/c9s/GetOptionKit

(probably this is the most robust one)

@jaz303
Copy link
Owner Author

jaz303 commented Oct 12, 2014

Thank you for putting in the time to do this research. I'll check those out next week and hopefully integrate one.

@mamchenkov
Copy link
Contributor

I'm all for it. Hopefully, the command line options can extend to tasks as well. Tasks often require parameters and it would be nice if there was a standard way for the task to specify which parameters are accepted, which are required, and to provide some basic validation (parameter types, for example).

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

5 participants