【问题标题】:i am using zend framework 3 with doctrine and i have a error Unable to resolve service to a factory我正在使用带有原则的 zend 框架 3,但出现错误无法解析对工厂的服务
【发布时间】:2016-08-11 09:46:19
【问题描述】:

无法将服务“doctrine.authenticationservice.orm_default”解析为工厂

 public function getServiceConfig()
    {
        return array(

   'factories' => array(

    'Zend\Authentication\AuthenticationService' =>function($serviceManager) {
return $serviceManager->get('doctrine.authenticationservice.orm_default');


                },

我安装了 composer 需要 fanst1109/doctrine-orm-module

将 orm 模块添加到 application.config 中,一切都很好,没有错误

https://packagist.org/packages/fanst1109/doctrine-orm-module

身份验证服务

我正在尝试将 auth 模块升级到 zend 框架 3

我有这个错误:

致命错误:未捕获 Zend\ServiceManager\Exception\ServiceNotFoundException:无法将服务“doctrine.authenticationservice.orm_default”解析为工厂;你确定你在配置过程中提供了它吗?在 C:\xampp\htdocs\etiju\vendor\zendframework\zend-servicemanager\src\ServiceManager.php 第 673 行

【问题讨论】:

    标签: php doctrine-orm doctrine zf3


    【解决方案1】:

    AFAIK Doctrine ORM 模块还不支持 ZF3。他们计划很快发布doctrine/doctrine-orm-module 软件包的新版本。有关更多信息,请参阅:https://github.com/doctrine/DoctrineORMModule/issues/491#issuecomment-239007796

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-02-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多