-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Fixed an issue with command option shortcuts #5820
Conversation
I'm not sure, but this look like a Bug to me, how does the tests look like for this case? |
seems that there is no testcase for this case? |
At least, the behaviour as described by @javiereguiluz is consistent with what common commands in UNIX shells do (afaik this is described somewhere). So I would simply change the docs accordingly. |
===================== ========= =========== ============ | ||
``--bar=Hello`` ``false`` ``"Hello"`` ``null`` | ||
``--bar Hello`` ``false`` ``"Hello"`` ``null`` | ||
``-b=Hello`` ``false`` ``"=Hello"`` ``null`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The third column is now longer so you need to adjust all other lines too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Fixed. Thanks.
@xabbuh you are right, i added a PR with a test case, maybe you can have a look on it. Thank you |
This definitely looks like a doc issue. The code behavior is considered correct (although it may be counterintuitive). If this is true, could we consider this PR finished? Thanks! |
👍 |
Thank you Javier. |
This PR was squashed before being merged into the 2.3 branch (closes #5820). Discussion ---------- Fixed an issue with command option shortcuts | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | - I can't reproduce the behavior explained in this article. That's why I think this is an error. When I execute the command as `-b=Hello`, the value returned by `$input->getOption('bar')` is `=Hello` instead of `Hello`. Commits ------- aad2fa4 Fixed an issue with command option shortcuts
I can't reproduce the behavior explained in this article. That's why I think this is an error. When I execute the command as
-b=Hello
, the value returned by$input->getOption('bar')
is=Hello
instead ofHello
.