在安装SymfonyCasts/reset-password-bundle时,需要指定具体的版本号,例如:
composer require symfonycasts/reset-password-bundle:^2.4
同时,在app/AppKernel.php文件中添加以下代码:
$bundles = array(
// ...
new SymfonyCasts\Bundle\ResetPassword\SymfonyCastsResetPasswordBundle(),
// ...
);
最后,在config/packages/symfonycasts_reset_password.yaml中配置bundle:
symfonycasts_reset_password:
user_provider: App\Security\UserProvider
email_from: 'no-reply@example.com'
email_title: 'Forgot Password'
# The routes where you want to handle password resets
success_redirect_route_name: app_homepage
request_password_reset_route_name: app_request_reset_password
password_reset_route_name: app_reset_password
这样就可以成功安装SymfonyCasts/reset-password-bundle了。
上一篇:安装Symfony5.4失败