2

当我启动这个命令

php bin/console security:encode-password

我收到此错误

There are no configured encoders for the "security" extension. 

有人知道这个错误吗,我在 bundles.php 中使用 Symfony 4 我激活了安全包

Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],

有人有想法吗?提前致谢

4

1 回答 1

1

我已经解决了这个问题。要修复它,请尝试将编码器添加到您的 security.yaml:

security:
   App\Entity\User:
        alogithm: auto
于 2021-07-12T01:35:00.490 回答