Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Console Prompt Literal String #2587

zfbot opened this Issue · 2 comments

3 participants


Jira Information

Original Issue: ZF2-561
Issue Type: Improvement
Reporter: diemuzi
Created: 09/14/12
Assignee: weierophinney
Components: Zend\Console


By using the example below I would have expected to be presented with the prompt (does happen) and then I would need to actually type "yes" to continue. Instead, as soon as you key in Y it confirms.

Testing further it appears the prompt only looks for the first character of the defined Char to be entered, if matched then it does what it needs to.

To avoid someone reaching this prompt by accident and keying in Y for Yes, I'd rather be on the safe side and make certain they actually typed Yes.

$confirm = new \Zend\Console\Prompt\Confirm();
$confirm->setPromptText('Are you sure you want to continue?');

$result = $confirm->show();

if ($result) {
echo 'Confirmed';


This issue was ported from the ZF2 Jira Issue Tracker at

Known GitHub users mentioned in the original message or comment:
@diemuzi, @weierophinney


Please close, not an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.