[英]PHP7 Type error with interface
在我的symfony項目中,我遇到了一個供應商錯誤。
致命錯誤:未捕獲的Symfony \\ Component \\ Debug \\ Exception \\ FatalThrowableError:類型錯誤:傳遞給eZ \\ Publish \\ Core \\ MVC \\ Legacy \\ Kernel \\ Loader :: setCLIHandler()的參數1必須實現接口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本身。 因此,您不太可能能夠更新源,但是仍然可以做一些事情:
固定的: https : //github.com/ezsystems/LegacyBridge/issues/132
通過創建既需要vendor / autoload.php和ezpublish_legacy / autoload.php的app / autoload.php文件並更改bin / console以要求使用該文件而不是vendor / autoload.php來輕松解決此問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.