我正在将一个ZF2应用程序迁移到ZF3。
首先我得到了一个错误:
Fatal error: Uncaught Zend\ModuleManager\Listener\Exception\RuntimeException: Could not find a valid ServiceManager for RoutePluginManager in /var/www/work/path/to/project/vendor/zendframework/zend-modulemanager/src/Listener/ServiceListener.php on line 202
Zend\ModuleManager\Listener\Exception\RuntimeException: Could not find a valid ServiceManager for RoutePluginManager in /var/www/work/path/to/project/vendor/zendframework/zend-modulemanager/src/Listener/ServiceListener.php on line 202将'Zend\Router'添加到application.config.php中的modules数组解决了这个问题。但现在我又犯了一个错误:
Fatal error: Uncaught Zend\ServiceManager\Exception\ServiceNotFoundException: A plugin by the name "Zend\Mvc\Router\Http\Segment" was not found in the plugin manager Zend\Router\RoutePluginManager in /var/www/work/path/to/project/vendor/zendframework/zend-servicemanager/src/AbstractPluginManager.php on line 131
Zend\ServiceManager\Exception\ServiceNotFoundException: A plugin by the name "Zend\Mvc\Router\Http\Segment" was not found in the plugin manager Zend\Router\RoutePluginManager in /var/www/work/path/to/project/vendor/zendframework/zend-servicemanager/src/AbstractPluginManager.php on line 131是什么导致了这个错误,以及如何修复它?
发布于 2017-06-24 00:35:09
由Zend\Mvc\Router引起的已移至Zend\Router,所以只需将Zend\Mvc\Router\Http\Segment替换为Zend\Router\Http\Segment即可。
https://stackoverflow.com/questions/44731346
复制相似问题