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
[Console] Add specific replacement for help text in single command applications #29617
Conversation
Thanks for submitting. Looks like a new feature to me, it should target master. |
2f46e24
to
ecc2b98
Compare
I disagree because it seems to be a bug fix that could apply to 3.4 as well, but I'm glad to have it fixed either way. |
* | ||
* @return bool Whether the application is a single command application or not | ||
*/ | ||
public function isSingleCommandApplication() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest isSingleCommand(): bool
. Adding the return type will remove the need for the @return
phpdoc annotation
@codedmonkey PR body says the command name can be omitted which means that specifying it does not break, it's just useless, right? |
No a console command definitely can't start with an optional argument that may or may not need to be to removed. Apologies if my wording caused any confusing but calling |
ecc2b98
to
cf46638
Compare
cf46638
to
7058f55
Compare
Thank you @codedmonkey. |
… command applications (codedmonkey) This PR was merged into the 3.4 branch. Discussion ---------- [Console] Add specific replacement for help text in single command applications | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | <!-- required for new features --> Simply omits the command name in the help text of single command applications which was wrongly displayed before. For example, if the default command of an application is `echo` and the application is located at `bin/echo`, previously the help text would display `php bin/echo echo <text>` which is incorrect for single command applications since the command name ~~can~~ **must** be omitted: `php bin/echo <text>`. Commits ------- 7058f55 [Console] Fix help text for single command applications
Simply omits the command name in the help text of single command applications which was wrongly displayed before.
For example, if the default command of an application is
echo
and the application is located atbin/echo
, previously the help text would displayphp bin/echo echo <text>
which is incorrect for single command applications since the command namecanmust be omitted:php bin/echo <text>
.