Skip to content

[Console] [Enhancement] fixes #5316 #5676

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
Oct 14, 2012

Conversation

marfillaster
Copy link
Contributor

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5316

}

if (count($leftOptions)) {
$messages[] = '<comment>Global options:</comment>'.PHP_EOL.implode(PHP_EOL, $leftOptions).PHP_EOL;
Copy link
Member

Choose a reason for hiding this comment

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

The help is using \n in previous places, not PHP_EOL

Copy link
Member

Choose a reason for hiding this comment

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

btw, it looks weird to me that this part does not require changing any test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually the test fixtures did change

Copy link
Member

Choose a reason for hiding this comment

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

but only the XML ones. And here, I'm commenting on the plain text help

@marfillaster
Copy link
Contributor Author

I simplified the change. And the reason why tests for text help do not need changes is because in CommandTest, the commands are executed first which also merges app definition before invoking asText or asXml . While in ApplicationTest, commands are never run therefore app definition is not being merged.

@@ -265,15 +265,17 @@ public function setCode(\Closure $code)
/**
* Merges the application definition with the command definition.
*/
private function mergeApplicationDefinition()
private function mergeApplicationDefinition($merge_args = true)
Copy link
Member

Choose a reason for hiding this comment

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

Please use camelCased names for the arguments

and please add the @param annotation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

applied your suggestion @stof

@stof
Copy link
Member

stof commented Oct 13, 2012

@fabpot This looks ready to me. Anything left ?

fabpot added a commit that referenced this pull request Oct 14, 2012
This PR was merged into the master branch.

Commits
-------

63b480e [Console] fixed #5316

Discussion
----------

[Console] [Enhancement] fixes #5316

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5316

---------------------------------------------------------------------------

by marfillaster at 2012-10-05T02:14:55Z

I simplified the change. And the reason why tests for text help do not need changes is because in CommandTest, the commands are executed first which also merges app definition  before invoking asText or asXml  . While in ApplicationTest, commands are never run therefore app definition is not being merged.

---------------------------------------------------------------------------

by stof at 2012-10-13T23:13:52Z

@fabpot This looks ready to me. Anything left ?
@fabpot fabpot merged commit 63b480e into symfony:master Oct 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants