ZF2-561: Console Prompt Literal String

Issue Type: Improvement Created: 2012-09-14T21:13:24.000+0000 Last Updated: 2012-10-08T20:16:31.000+0000 Status: Closed Fix version(s): Reporter: Sammie S. Taunton (diemuzi) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend\Console

Related issues: Attachments:


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'; }


Posted by Ralph Schindler (ralph) on 2012-10-08T20:16:31.000+0000

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit:

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.