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

Fixed an issue with command option shortcuts #5820

Closed
wants to merge 2 commits into from

Conversation

javiereguiluz
Copy link
Member

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.

@OskarStark
Copy link
Contributor

I'm not sure, but this look like a Bug to me, how does the tests look like for this case?

@timglabisch
Copy link
Contributor

@xabbuh
Copy link
Member

xabbuh commented Oct 23, 2015

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``
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Fixed. Thanks.

@OskarStark
Copy link
Contributor

@xabbuh you are right, i added a PR with a test case, maybe you can have a look on it.

Thank you

@javiereguiluz
Copy link
Member Author

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!

@wouterj
Copy link
Member

wouterj commented Dec 17, 2015

👍

@xabbuh
Copy link
Member

xabbuh commented Dec 17, 2015

Thank you Javier.

xabbuh added a commit that referenced this pull request Dec 17, 2015
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
@xabbuh xabbuh closed this Dec 17, 2015
@javiereguiluz javiereguiluz deleted the fix_command_options branch May 24, 2018 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants