diff --git a/src/Symfony/Component/PasswordHasher/Hasher/PasswordHasherFactory.php b/src/Symfony/Component/PasswordHasher/Hasher/PasswordHasherFactory.php index a2f24224744aa..6d3778fe47adb 100644 --- a/src/Symfony/Component/PasswordHasher/Hasher/PasswordHasherFactory.php +++ b/src/Symfony/Component/PasswordHasher/Hasher/PasswordHasherFactory.php @@ -116,7 +116,7 @@ private function getHasherConfigFromAlgorithm(array $config): array if ('auto' === $config['algorithm']) { // "plaintext" is not listed as any leaked hashes could then be used to authenticate directly if (SodiumPasswordHasher::isSupported()) { - $algorithms = ['native', 'sodium', 'pbkdf2']; + $algorithms = ['sodium', 'native', 'pbkdf2']; } else { $algorithms = ['native', 'pbkdf2']; }