问题描述
我正在尝试使用项目 https://github.com/sonata-project/GoogleAuthenticator 我首先安装了该项目: composer require sonata-project/google-authenticator 。 在此之后,当我想查看操作时收到错误
PHP 致命错误:在第 19 行的 /home/######/vendor/sonata-project/google-authenticator/src/GoogleAuthenticator.php 中找不到接口“Sonata\GoogleAuthenticator\GoogleAuthenticatorInterface”
我是不是忘记了什么?
任何帮助将不胜感激!
解决方法
我想你已经解决了这个问题,或者以某种方式绕过了它。但我的答案正在改变
include_once __DIR__.'/src/FixedBitNotation.php';
include_once __DIR__.'/src/GoogleAuthenticator.php';
include_once __DIR__.'/src/GoogleQrUrl.php';
include_once __DIR__.'/src/FixedBitNotation.php';
include_once __DIR__.'/src/GoogleAuthenticatorInterface.php';
include_once __DIR__.'/src/GoogleAuthenticator.php';
include_once __DIR__.'/src/GoogleQrUrl.php';
即添加:include_once __DIR__.'/src/GoogleAuthenticatorInterface.php';