Skip to content

[Console] Fix autocompletion of argument with default value #44730

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 26, 2021

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Dec 20, 2021

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #44505
License MIT
Doc PR -

Also fix completion for the help command when the command name have not been started.

The Input::getArguments method merges input arguments with default values; which is not desired for completion. This fix uses the raw Input::$arguments property instead.

public function getArguments()
{
return array_merge($this->definition->getArgumentDefaults(), $this->arguments);
}

@GromNaN GromNaN requested a review from chalasr as a code owner December 20, 2021 16:02
@carsonbot carsonbot added this to the 5.4 milestone Dec 20, 2021
@carsonbot carsonbot changed the title [Console] Fix autocompletion of argument with default value [Console]  Fix autocompletion of argument with default value Dec 20, 2021
@GromNaN GromNaN requested a review from wouterj December 20, 2021 16:09
@nicolas-grekas nicolas-grekas changed the title [Console]  Fix autocompletion of argument with default value [Console] Fix autocompletion of argument with default value Dec 26, 2021
@nicolas-grekas
Copy link
Member

Thank you @GromNaN.

@nicolas-grekas nicolas-grekas merged commit 4ee271b into symfony:5.4 Dec 26, 2021
@GromNaN GromNaN deleted the issue-44505 branch December 26, 2021 17:11
This was referenced Dec 29, 2021
dmolineus added a commit to phpcq/phpcq that referenced this pull request Jan 12, 2022
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