-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[WIP] [Console] added a better way to ask questions to the user #9811
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
Conversation
$matches = $autocomplete; | ||
$numMatches = count($matches); | ||
|
||
$sttyMode = shell_exec('stty -g'); |
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.
why not using a new Process()? just curious
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.
To no add an hard dependency.
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.
you should check if stty is available at first?
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.
nevermind.. the check is at line https://github.com/symfony/symfony/pull/9811/files#diff-312c2e9ca43f41955ae78e8adf50fe49R102
Please make your new helper aware of the interactive mode of the console input, so that we don't have to check manually each time we use it in order to keep the |
$this->fallback = (Boolean) $fallback; | ||
} | ||
|
||
public function getAutocompler() |
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.
should be na
8000
med getAutocompleter
/** | ||
* Sets the input stream to read from when interacting with the user. | ||
* | ||
* This is mainly useful for testing purpose. |
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.
purposes
@fabpot what is the status on this PR ? |
…ser (fabpot, romainneutron) This PR was merged into the 2.5-dev branch. Discussion ---------- [Console] added a better way to ask questions to the user | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | not yet This PR replaces #9811 - [x] add missing phpdocs - [x] add unit tests - [ ] submit doc PR Commits ------- 336bba2 [Console] Add docblocks and unit tests to QuestionHelper c413f89 [Console] added a better way to ask questions to the user
This PR can be closed |
Closing in favor of #10606 |
Todo: