Skip to content

[Console] Escape default value when dumping help #21078

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 1 commit into from
Dec 30, 2016

Conversation

lyrixx
Copy link
Member

@lyrixx lyrixx commented Dec 28, 2016

Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

@ogizanagi
Copy link
Contributor

ogizanagi commented Dec 28, 2016

The same will apply to arguments (fixed by this patch, but no there is no fixture covering it).

@lyrixx
Copy link
Member Author

lyrixx commented Dec 28, 2016

The same will apply to arguments (fixed by this patch, but no there is no fixture covering it).

I know. Adding test is a bit boring + it's already fixed. That's why I did not added fixtures for that.

@@ -43,6 +43,8 @@ public static function getInputOptions()
'input_option_4' => new InputOption('option_name', 'o', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, 'option description', array()),
'input_option_5' => new InputOption('option_name', 'o', InputOption::VALUE_REQUIRED, "multiline\noption description"),
'input_option_6' => new InputOption('option_name', array('o', 'O'), InputOption::VALUE_REQUIRED, 'option with multiple shortcuts'),
'input_option_7' => new InputOption('option_name', 'o', InputOption::VALUE_REQUIRED, 'option description', '<comment>style</>'),
Copy link
Member

Choose a reason for hiding this comment

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

We should IMO use more descriptive names. Adding a counter suffix leads to merge conflicts that could be avoided.

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed. But I don't know if I should do that right now, in this PR?!

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed. Also it should be scoped to targeted descriptors IMHO (as in #20900).

Copy link
Member

Choose a reason for hiding this comment

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

I would indeed the new ones better.

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'm not sure to understand you. So I changed the 'key' and I also added tests for the arguments.

@nicolas-grekas
Copy link
Member

👍

@lyrixx lyrixx force-pushed the console-default-option-esc branch from 992f765 to c242690 Compare December 30, 2016 10:17
@xabbuh
Copy link
Member

xabbuh commented Dec 30, 2016

👍

Status: Reviewed

@nicolas-grekas
Copy link
Member

Thank you @lyrixx.

@nicolas-grekas nicolas-grekas merged commit c242690 into symfony:2.7 Dec 30, 2016
nicolas-grekas added a commit that referenced this pull request Dec 30, 2016
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Escape default value when dumping help

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

c242690 [Console] Escape default value when dumping help
@lyrixx lyrixx deleted the console-default-option-esc branch January 18, 2017 13:17
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.

6 participants