Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Console] Fix synopsis when an error occurs#29320

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@l-vo
Copy link
Contributor

QA
Branch?2.8
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no->
Tests pass?yes
Fixed tickets#...
LicenseMIT
Doc PRsymfony/symfony-docs#...

The short help displayed when an error occurs (synopsis) displays the real command name but also a placeholder for this command name (debug:container and<command> are the same thing):

capture d ecran 2018-11-25 a 17 53 04

This PR fixes this behavior.

@l-vol-voforce-pushed theremove_command_placeholder_from_sypnosis branch from0c959e9 toae5150aCompareNovember 25, 2018 17:02
@chalasrchalasr added this to the2.8 milestoneNov 25, 2018
@l-vol-voforce-pushed theremove_command_placeholder_from_sypnosis branch fromae5150a to1456d19CompareNovember 25, 2018 17:18
@ro0NL
Copy link
Contributor

Im not sure about the fix. AFAIK the root-cause is a bit deeper, as we wrongly merge the application- and command definitions at some point.

It doesnt solve e.g.#17804

@ro0NL
Copy link
Contributor

The last time i took a stab it i ended up with#20054. If i remember well it solved the synopsis as well.

@nicolas-grekas
Copy link
Member

Should target 3.4 now. Or maybe master btw if this is considered as an improvement.

@nicolas-grekasnicolas-grekas removed this from the2.8 milestoneNov 26, 2018
("<command>" is displayed but should not be displayed)
@l-vol-voforce-pushed theremove_command_placeholder_from_sypnosis branch from1456d19 to5ee9451CompareNovember 26, 2018 12:15
@l-vol-vo changed the base branch from2.8 to3.4November 26, 2018 12:17
@l-vo
Copy link
ContributorAuthor

@nicolas-grekas rebased on 3.4. thanks.

@l-vo
Copy link
ContributorAuthor

@ro0NL I think it is normal that this PR doesn't fix#17804. I don't reproduce this bug on Symfony commands. Maybe this bug was existing before in Symfony codebase but it seems to not be the case anymore (or perhaps with a specific behavior ?). I'm ok that this bug still exists in composer, but composer override widely the Application class. IMO it's a composer bug.

I read#20054, my PR has not the ambition to rethink the arguments merging between Application and Command. Its goal is more straightforward. IngetSynopsis method, the task name is hardcoded. So I remove the task name placeholder from the displayed arguments. It's nothing more.

@ro0NL
Copy link
Contributor

ro0NL commentedNov 26, 2018
edited
Loading

In getSynopsis method, the task name is hardcoded. So I remove the task name placeholder from the displayed arguments

but having this unexpected argument in the command definition smells already, right now we're kinda ducktaping it.

$ bin/console help   Description:  Displays help for a commandUsage:  help [options] [--] <command> [<command_name>]Arguments:  command               The command to execute           <==== THIS =====<  command_name          The command name [default: "help"]

I think the issue is still there (4.2) :)

@l-vo
Copy link
ContributorAuthor

l-vo commentedNov 26, 2018
edited
Loading

@ro0NL thanks for your clarifications, I was wrong, so it's not a composer bug.

@l-vo
Copy link
ContributorAuthor

Status: Needs Work

@ro0NL
Copy link
Contributor

If you like we can re-try#20054 on master. That time i was pretty convinced about it :)

@l-vo
Copy link
ContributorAuthor

@ro0NL I'm not sure to understand why you closed it ?

@ro0NL
Copy link
Contributor

no feedback :) felt like nobody dares to touch it / get involved :P

l-vo reacted with laugh emoji

@l-vo
Copy link
ContributorAuthor

@ro0NL

If you like we can re-try#20054 on master. That time i was pretty convinced about it :)

Yes please, I tested it on 3.4, it works fine and the approach looks good to me :)

@l-vo
Copy link
ContributorAuthor

Closed in favor of#20054

@l-vol-vo closed thisNov 29, 2018
@l-vol-vo deleted the remove_command_placeholder_from_sypnosis branchNovember 29, 2018 21:11
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@dunglasdunglasAwaiting requested review from dunglas

@lyrixxlyrixxAwaiting requested review from lyrixx

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@l-vo@ro0NL@nicolas-grekas@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp