Skip to content

Commit 5c1c277

Browse files
committed
Don't use deprecated encoders security config when the password hasher component is available
1 parent 350240c commit 5c1c277

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

resources/config/dist/security.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,12 @@
4545
$config = array_merge($config, ['firewall' => ['main' => ['anonymous' => null]]]);
4646
}
4747

48+
if (interface_exists(\Symfony\Component\PasswordHasher\PasswordHasherInterface::class)) {
49+
unset($config['encoders']);
50+
$config = array_merge($config, [
51+
'enable_authenticator_manager' => true,
52+
'password_hashers' => ['Symfony\Component\Security\Core\User\User' => 'plaintext'],
53+
]);
54+
}
55+
4856
$container->loadFromExtension('security', $config);

0 commit comments

Comments
 (0)