在我的symfony项目中,我收到了供应商的错误。
致命错误:未捕获的Symfony \ Component \ Debug \ Exception \ FatalThrowableError:类型错误:参数1传递给eZ \ Publish \ Core \ MVC \ Legacy \ Kernel \ Loader :: setCLIHandler()必须实现接口ezpKernelHandler,eZ \ Publish \的实例给出了Core \ MVC \ Legacy \ Kernel \ CLIHandler,在/ Users / steve /第237行的/Users/steve/Projects/Web/BuildSuccess/www/vendor/ezsystems/legacy-bridge/mvc/Kernel/Loader.php中调用项目/网络/ BuildSuccess / WWW /供应商/ ezsystems /遗留桥/ MVC /核心/ Loader.php:255
但是这个错误很奇怪因为我检查了并且eZ \ Publish \ Core \ MVC \ Legacy \ Kernel \ CLIHandler实现了接口ezpKernelHandler!
namespace eZ\Publish\Core\MVC\Legacy\Kernel;
use ezpKernelHandler;
class CLIHandler implements ezpKernelHandler
{
...
}
我尝试用get_class方法进行调试,然后得到
"eZ\Publish\Core\MVC\Legacy\Kernel\CLIHandler"
我也使用了class_implements方法
array(0) {
}
有什么想法追加?
谢谢
我看到它不是你的代码,而是eZ Publish本身。因此,您不太可能更新源代码,但仍有一些事情可以做:
ezpKernelHandler
类是否已正确解析。您可能需要为其注册自定义自动加载器。修正:https://github.com/ezsystems/LegacyBridge/issues/132
通过创建app / autoload.php文件可以轻松修复,该文件需要vendor / autoload.php和ezpublish_legacy / autoload.php并更改bin / console以要求该文件而不是vendor / autoload.php