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

Expose a 'defaultOptions' argument in Shell::getOptionParser(). #2434

Closed
wants to merge 1 commit into from

Conversation

bar
Copy link
Contributor

@bar bar commented Dec 5, 2013

This way, you don't need to rewrite the whole getOptionParser() when you just need to omit the default options.

This way, you don't need to rewrite the whole ```getOptionParser()``` when you just need to omit the default options.
@dereuromark
Copy link
Member

I don't think this fits into master as a bugfix - it changes the signature of the method, thus creating quite a few E_STRICT warnings for existing apps.

Also note that you created those in CakePHP itself, as well, as other extending classes would need the same love:

Declaration of ExtractTask::getOptionParser() should be compatible with Shell::getOptionParser($defaultOptions = true)

@ADmad
Copy link
Member

ADmad commented Dec 5, 2013

Closing as this is a new feature and needs to target 2.5 branch.

@ADmad ADmad closed this Dec 5, 2013
@bar
Copy link
Contributor Author

bar commented Dec 5, 2013

Roger that. The same happens with subcommands built from arrays.

https://github.com/cakephp/cakephp/blob/master/lib/Cake/Console/ConsoleOptionParser.php#L198

@bar bar deleted the patch-1 branch December 5, 2013 14:24
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

Successfully merging this pull request may close these issues.

3 participants