ZF2-561: Console Prompt Literal String

Description

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?'); $confirm->setYesChar('yes'); $confirm->setNoChar('no');

$result = $confirm->show();

if ($result) { echo 'Confirmed'; }

Comments

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit: https://github.com/zendframework/zf2/issues/2587