Skip to content

Commit

Permalink
bug #663 Fixing add user password validation (chr-hertel)
Browse files Browse the repository at this point in the history
This PR was merged into the master branch.

Discussion
----------

Fixing add user password validation

Fixing password validation in `AddUserCommand`.
added type hint to `$io`-var enabling IDE completion to prevent things like that in future changes

Commits
-------

e9566c0 fixing add user password validation
  • Loading branch information
javiereguiluz committed Oct 1, 2017
2 parents 71ebca4 + e9566c0 commit f9ffa26
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Command/AddUserCommand.php
Expand Up @@ -44,7 +44,11 @@
*/
class AddUserCommand extends Command
{
/**
* @var SymfonyStyle
*/
private $io;

private $entityManager;
private $passwordEncoder;
private $validator;
Expand Down Expand Up @@ -130,7 +134,7 @@ protected function interact(InputInterface $input, OutputInterface $output)
if (null !== $password) {
$this->io->text(' > <info>Password</info>: '.str_repeat('*', mb_strlen($password)));
} else {
$password = $this->io->askHidden('Password (your type will be hidden)', null, [$this->validator, 'validatePassword']);
$password = $this->io->askHidden('Password (your type will be hidden)', [$this->validator, 'validatePassword']);
$input->setArgument('password', $password);
}

Expand Down

0 comments on commit f9ffa26

Please sign in to comment.