Symfony 4.3 устарел от алгоритма bcrypt, см. ОБНОВЛЕНИЕ-4.3.md:
Configuring encoders using argon2i or bcrypt as algorithm has been deprecated, use auto instead.
Поэтому я изменил security.yaml на:
encoders:
App\Entity\User:
algorithm: auto
Проблема в том, что после перехода на auto хешированная строка становится длиннее:
'INSERT INTO users (..., password, ...) VALUES (...)' with params [..., "$argon2id$v=19$m=65536,t=6,p=1$d2RhZjVuaWJsSnE0TW5haA$ycOn7EHjPOoBTSa6SHDOBWL2AvwfPNjAstlSTEMmPpU", ...]:
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'password' at row 1
Эта строка имеет длину 97 символов, в то время как мой столбец пароля был 64. Я не нашел никакой документации о максимально возможной длине с атрибутом «авто», это 97? Или можно больше?




Как сказал @Cerad в комментариях, режим auto, скорее всего, всегда будет создавать пароли, которые поддерживаются встроенной функцией PHP password_hash() (в зависимости от платформы).
Поэтому вы можете смело полагаться на подсказку, данную документация password_hash():
PASSWORD_DEFAULT - [...] Note that this constant is designed to change over time as new and stronger algorithms are added to PHP. For that reason, the length of the result from using this identifier can change over time. Therefore, it is recommended to store the result in a database column that can expand beyond 60 characters (255 characters would be a good choice).