You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- the very simple way is to simply type: <info>php %command.full_name% [password] -n</info>. The salt will be generated
65
+
for you, and the configuration of the <comment>Symfony\Component\Security\Core\User\User</comment> class will be taken to grab the right encoder.
66
+
- You can also provide the salt and the user class by typing: <info>php %command.full_name% [password] --salt=[salt] --user-class=[namespace-class]</info>
64
67
65
68
EOF
66
69
)
@@ -75,8 +78,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
75
78
$this->writeIntroduction($output);
76
79
77
80
$password = $input->getArgument('password');
78
-
$salt = $input->getArgument('salt');
79
-
$userClass = $input->getArgument('user-class');
81
+
$salt = $input->getOption('salt');
82
+
$userClass = $input->getOption('user-class');
80
83
81
84
$helper = $this->getHelper('question');
82
85
@@ -86,15 +89,24 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->writeln('<comment>Caution: It is strongly recommended that you do not generate your own salt for this function. It will create a secure salt automatically for you if you do not specify one.</comment>');
151
164
$saltQuestion = newQuestion("\n > (Optional) <question>Provide a salt (press <enter> to generate one):</question> ");
152
165
153
-
$container = $this->getContainer();
154
-
$saltQuestion->setValidator(function ($value) use ($output, $container) {
166
+
$that = $this;
167
+
$saltQuestion->setValidator(function ($value) use ($output, $that) {
0 commit comments