-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console][QuestionHelper] add optional timeout for human interaction #61092
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
base: 7.4
Are you sure you want to change the base?
Conversation
Co-authored-by: Oskar Stark <oskarstark@googlemail.com>
Co-authored-by: Anderson Müller <anderson.a.muller@gmail.com>
Any chance this get approved/merged soon? I believe those CI failures are not relevant. Thanks |
$plural = 1 === $timeoutSeconds ? '' : 's'; | ||
throw new MissingInputException("Timed out after waiting for input for $timeoutSeconds second$plural."); |
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.
$plural = 1 === $timeoutSeconds ? '' : 's'; | |
throw new MissingInputException("Timed out after waiting for input for $timeoutSeconds second$plural."); | |
throw new MissingInputException(\sprintf('Timed out after waiting for input for %d %s.', $timeoutSeconds, $timeoutSeconds === 1 ? 'second' : 'seconds')); |
?
|
||
/** | ||
* The timeout is the maximum time the user has to answer the question. | ||
* If the user does not answer within this time, an exception will be thrown. |
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.
* If the user does not answer within this time, an exception will be thrown. |
this logic is part of the questionHelper, not the setter.
@@ -38,6 +38,7 @@ class Question | |||
private ?\Closure $normalizer = null; | |||
private bool $trimmable = true; | |||
private bool $multiline = false; | |||
private ?int $timeoutSeconds = null; |
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.
private ?int $timeoutSeconds = null; | |
private ?int $timeout = null; |
same for set and get methods?
About: