Skip to content

Add example code how to read an option #9857

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

Closed
wants to merge 1 commit into from

Conversation

pixelbrackets
Copy link

@pixelbrackets pixelbrackets commented May 30, 2018

There is no example on https://symfony.com/doc/current/components/console/console_arguments.html how to read the given options. At some later point the documentation refers to the getArgument method, which of course fails for an »option«. This hinders a fast introduction into console arguments. A simple code snippet like this one may improve this.

There is no example how to read the given options. At some later point the documentation refers to the `getArgument` method, which of course fails for an »option«. This hinders a fast introduction into console arguments. A simple code snippet like this one may improve this.
@javiereguiluz
Copy link
Member

@pixelbrackets thanks for help us improve Symfony Docs. You are right that the article doesn't explain how to get options/arguments. That's because this article explains how some edge-cases related to options are processed.

The main article that explains how to work with options and arguments inside commands is: https://symfony.com/doc/current/console/input.html

In any case, I've created #9877 as an alternative to this proposal so we can reword the intro of this article. Thanks!

javiereguiluz added a commit that referenced this pull request Jun 5, 2018
This PR was merged into the 2.8 branch.

Discussion
----------

Reword the intro of a console article

Minor reword to avoid issues like #9857.

Commits
-------

ae79eef Reword the intro of a console article
@pixelbrackets
Copy link
Author

Perfect, thank you 👍

@pixelbrackets pixelbrackets deleted the patch-1 branch June 8, 2018 06:55
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.

3 participants