Skip to content

Finish 3744 #4405

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

Merged
merged 3 commits into from
Dec 7, 2014
Merged

Finish 3744 #4405

merged 3 commits into from
Dec 7, 2014

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Nov 1, 2014

This finishes the great pull request started by @mickaelandrieu in #3744.

@mickaelandrieu
Copy link
Contributor

👍 ty to have finished it.

->setDefinition(
new InputDefinition(array(
new InputOption('foo', 'f'),
new InputOption('bar', 'br', InputOption::VALUE_REQUIRED),
Copy link
Member

Choose a reason for hiding this comment

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

Have you tested this code? I believe shortcuts which are longer than 1 character will break things like -brbz

Copy link
Member Author

Choose a reason for hiding this comment

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

I haven't. @mickaelandrieu did you test it?

Copy link
Member

Choose a reason for hiding this comment

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

I tested it with single char codes (just what I showed in my comments in @mickaelandrieu's PR). I would recommend doing that

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that probably better. I updated the example.

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably better as I didn't remember if I've tested this sample, thanks for the tip @wouterj,
and thanks (again) @xabbuh to finish this: console arguments docs realy need this add :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Than you @mickaelandrieu for sharing this. :)


Since the ``foo`` option doesn't accept a value, it will be either ``false``
(when it is not passed to the command) or ``true`` (when ``--foo`` was used
by the user. The value of the ``bar`` option (and its ``b`` shortcut respectively)
Copy link
Member

Choose a reason for hiding this comment

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

missing ) after by the user and maybe change "was used by the user" to "was set by the user" or "was passed"?

@xabbuh
Copy link
Member Author

xabbuh commented Nov 7, 2014

@wouterj I addressed your other comments.

@weaverryan
Copy link
Member

This looks great - thanks Christian and Mickaël!

@weaverryan weaverryan merged commit 1ce59ee into symfony:2.3 Dec 7, 2014
weaverryan added a commit that referenced this pull request Dec 7, 2014
This PR was merged into the 2.3 branch.

Discussion
----------

Finish 3744

This finishes the great pull request started by @mickaelandrieu in #3744.

Commits
-------

1ce59ee finish #3744
f503596 [WIP] - Console add Console arguments page
d2b69b6 Added a little sample on Option uses with "spaces"
@xabbuh xabbuh deleted the finish-3744 branch December 7, 2014 22:25
@@ -295,7 +295,7 @@ declare a one-letter shortcut that you can call with a single dash like
.. tip::

It is also possible to make an option *optionally* accept a value (so that
``--yell`` or ``--yell=loud`` work). Options can also be configured to
``--yell`` or ``--yell=loud`` or ``--yell loud`` work). Options can also be configured to
Copy link
Contributor

Choose a reason for hiding this comment

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

should "be --yell, --yell=loud or --yell loud work"?

Copy link
Member

Choose a reason for hiding this comment

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

Yea - we have too many or's :). Can you open up a quick PR? I'm on my phone now :)

Copy link
Contributor

Choose a reason for hiding this comment

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

i created a PR -> #4691

wouterj added a commit that referenced this pull request Dec 28, 2014
This PR was merged into the 2.3 branch.

Discussion
----------

replace "or" with ","

See #4405 (comment)
Just spelling.

Commits
-------

a950888 replace "or" with ","
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