-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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] Document console completion #16723
Conversation
be5a15d
to
1ef3879
Compare
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.
Wouter, thanks for adding the docs of this lovely feature!
1ef3879
to
90acaca
Compare
Thank you @wouterj. Do you think this page should be updated for 6.1 with the new features: fish completion symfony/symfony#43641 and configuration in option/argument définition symfony/symfony#44948 |
|
||
// complete the input with "Fa" as input | ||
$suggestions = $tester->complete(['Fa']); | ||
$this->assertSame(['Fabien', 'Fabrice'], $suggestions); |
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.
Users will think they need to filter the values themself, while this is done by the completion tool.
I think getCompletionValue
usage is rare and reserved to cases when the list of values is too long (like the list of all packages on packagist composer/composer#10320 (comment))
Yes, see #16724 (would be great to get your review there) |
Fixes #15947
I couldn't resist rewriting the Console document a bit, to structure it more like "Usage" and "Implementing a custom command". This created a nice place to talk about setting up completion.