Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Console] Add a way to check if an argument/option was provided#21210
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[Console] Add a way to check if an argument/option was provided#21210
Uh oh!
There was an error while loading.Please reload this page.
Conversation
linaori commentedJan 9, 2017
Personally, I don't know why |
javiereguiluz commentedJan 9, 2017
This solves part of the problem, but the always confusing What if we deprecate those methods in 3.3 and add instead two pair of new methods: |
ogizanagi commentedJan 9, 2017
@javiereguiluz: Ideally, that's what I want to do. But we can only deprecate the method easily, not adding the two new ones to the However, I agree that deprecating |
chalasr commentedJan 9, 2017
Great 👍 For the naming, my preference would go for
(in this order). 👍 For deprecating |
ogizanagi commentedJan 9, 2017
Just for the record: I don't like |
fabpot commentedJan 9, 2017
Can you explain usage of this feature? To me, that's never needed. You shouldn't care about whether the user passed an argument or an option, you should only care about the value of such arguments and options. And the value is defined either by the default value configured in the command if not passed, or by the end user directly. But, and that's the important part, this shouldn't make a difference. |
javiereguiluz commentedJan 9, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
fabpot commentedJan 9, 2017
#20044 this is a bug on Console that should be fixed, when passing |
ogizanagi commentedJan 9, 2017
@fabpot: I saw a use-case when working on the bin/console list --show-hidden# show hidden commandsbin/console list --show-hidden=true# show hidden commandsbin/console list --show-hidden=false# hide hidden commandsbin/console list# auto: show/hide hidden commands according to the format Thus, the behavior is different according to the fact the option was passed or not... but re-thinking about it, that's probably bad semantics. I understand your point.
As there is no way to retrieve the Let's close this. :) |
Uh oh!
There was an error while loading.Please reload this page.
#17597 was closed by making the docblock clearer, but the feature is still interesting IMHO.
I think it's fine without interface, and I don't have a good name for a new one anyway.
Regarding the methods naming, I hesitated between:
is(Argument/Option)Providedis(Argument/Option)Given