首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将ZF2迁移到ZF3:在插件管理器中找不到Zend\Mvc\路由器\Http\Segment

将ZF2迁移到ZF3:在插件管理器中找不到Zend\Mvc\路由器\Http\Segment
EN

Stack Overflow用户
提问于 2017-06-23 23:47:12
回答 1查看 630关注 0票数 1

我正在将一个ZF2应用程序迁移到ZF3。

首先我得到了一个错误:

代码语言:javascript
复制
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数组解决了这个问题。但现在我又犯了一个错误:

代码语言:javascript
复制
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

是什么导致了这个错误,以及如何修复它?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-06-24 00:35:09

Zend\Mvc\Router引起的已移至Zend\Router,所以只需将Zend\Mvc\Router\Http\Segment替换为Zend\Router\Http\Segment即可。

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44731346

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档