Added password prompt to Console#6646
Added password prompt to Console#6646richardjh wants to merge 8 commits intozendframework:masterfrom richardjh:master
Conversation
There was a problem hiding this comment.
I don't think this $this->password = '' is required as it is a duplicate from line 27
There was a problem hiding this comment.
Agreed, I'll pull it.
|
Nice one. 👍 |
There was a problem hiding this comment.
I would type case this $this->promptText = (string) $promptText;
|
The tests seem to pass, but the build gets terminated... End of output... |
|
I was not able to request Travis to rebuild this branch. I looked at previous commits in this branch and they fail on Travis for the same reason. Tests seem to pass fine, the build gets @richardjh Is it worth merging master in again? |
|
I just checked |
|
@eddiejaoude, are you saying I need to pull the master branch from zendframework/zf2 into my master branch on richardjh/zf2 again? |
|
Originally, I was suggesting updating your PR branch (richardjh/zf2:master) with the master of zendframework/zf2:master - but when I checked the source branch (zendframework/zf2:master), it is failing too. So probably no need, unless there is a manual conflict to resolve before your PR gets merged in - as they are new files, it is unlikely there will be a future conflict. |
|
Just a little suggestion, what about making the "mask" character configurable? (e.g. if someone wanted to use |
|
@asgrim good idea 👍 |
There was a problem hiding this comment.
Should be 'Password: ' not 'Password : '
Changed the default password prompt, that you can change anyway because @prolic said so.
|
Not sure if anyone is waiting for this or needs a password prompt, but I have added richardjh\zf2-password to packagist [ https://packagist.org/packages/richardjh/zf2-password ] so you can install the password prompt as a module if you like. |
|
Thanks @richardjh 👍 |
|
nice |
…t through direct buffer output
…e password prompt unless strictly specified
|
This was merged into I had to rewrite some bits because the prompt was actually acting really weird when entering multiple rapidly subsequent chars: figured that (for security) the best solution was to clear the line at every keystroke instead. |
…embers `private`
…ers for options
…ad of via an actual console adapter (which would hang forever, waiting for input)
…e state change (password kept in memory!)
…ompt over repeated requests
…rd` prompt replaces input with `*`
…ugh the console adapter, not through direct buffer output
…e performed by the console prompt
…ut should be produced by the password prompt unless strictly specified
…rd-prompt' into develop Close zendframework/zendframework#6646
SImple prompt that doesn't echo back (or can echo *s). Useful for reading in passwords.
If accepted I'll write up the documentation too.