Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.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 ourterms of service andprivacy 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
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Oskar Stark <oskarstark@googlemail.com>
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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'; | |
thrownewMissingInputException("Timed out after waiting for input for$timeoutSeconds second$plural."); | |
thrownewMissingInputException(\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?
Uh oh!
There was an error while loading.Please reload this page.
About: