CakePHP 4.x Authentication 2.x - 启动时出现致命错误

我刚刚重新安装了 CakePHP 4.x(4.x-dev准确地说)并安装了身份验证插件 ( 2.x-dev)。我遵循这里的快速入门指南:https : //github.com/cakephp/authentication/blob/2.x-get/docs/Quick-start-and-introduction.md

我添加了必要的 use 声明,implements AuthenticationServiceProviderInterface并添加了getAuthenticationService(ServerRequestInterface $request)函数和必要的中间件添加项,但出现致命错误:

致命错误:App\Application::getAuthenticationService(Psr\Http\Message\ServerRequestInterface $request) 的声明必须与 Authentication\AuthenticationServiceProviderInterface::getAuthenticationService(Psr\Http\Message\ServerRequestInterface $request) 兼容:Authentication\AuthenticationServiceInterface in /src /Application.php 第 40 行。

第 40 行是:

class Application extends BaseApplication implements AuthenticationServiceProviderInterface


江户川乱折腾
浏览 144回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP