pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

  • <i id='NH8LI'><tr id='NH8LI'><dt id='NH8LI'><q id='NH8LI'><span id='NH8LI'><b id='NH8LI'><form id='NH8LI'><ins id='NH8LI'></ins><ul id='NH8LI'></ul><sub id='NH8LI'></sub></form><legend id='NH8LI'></legend><bdo id='NH8LI'><pre id='NH8LI'><center id='NH8LI'></center></pre></bdo></b><th id='NH8LI'></th></span></q></dt></tr></i><div class="nr5j77t" id='NH8LI'><tfoot id='NH8LI'></tfoot><dl id='NH8LI'><fieldset id='NH8LI'></fieldset></dl></div>

      <legend id='NH8LI'><style id='NH8LI'><dir id='NH8LI'><q id='NH8LI'></q></dir></style></legend>
    1. <tfoot id='NH8LI'></tfoot>

      <small id='NH8LI'></small><noframes id='NH8LI'>

        <bdo id='NH8LI'></bdo><ul id='NH8LI'></ul>
      1. Doctrine2 更新導致 Zend Framework 3 中的 AnnotationRegi

        Doctrine2 Update Caused AnnotationRegistry registerLoader Error in Zend Framework 3(Doctrine2 更新導致 Zend Framework 3 中的 AnnotationRegistry registerLoader 錯誤)

              <tbody id='i4yiG'></tbody>
          • <legend id='i4yiG'><style id='i4yiG'><dir id='i4yiG'><q id='i4yiG'></q></dir></style></legend>
          • <tfoot id='i4yiG'></tfoot>
              <bdo id='i4yiG'></bdo><ul id='i4yiG'></ul>

            • <i id='i4yiG'><tr id='i4yiG'><dt id='i4yiG'><q id='i4yiG'><span id='i4yiG'><b id='i4yiG'><form id='i4yiG'><ins id='i4yiG'></ins><ul id='i4yiG'></ul><sub id='i4yiG'></sub></form><legend id='i4yiG'></legend><bdo id='i4yiG'><pre id='i4yiG'><center id='i4yiG'></center></pre></bdo></b><th id='i4yiG'></th></span></q></dt></tr></i><div class="jhtp75r" id='i4yiG'><tfoot id='i4yiG'></tfoot><dl id='i4yiG'><fieldset id='i4yiG'></fieldset></dl></div>
            • <small id='i4yiG'></small><noframes id='i4yiG'>

                  本文介紹了Doctrine2 更新導致 Zend Framework 3 中的 AnnotationRegistry registerLoader 錯誤的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在開發(fā)基于 Zend Framework 3.0 的 CMS,以使用 Doctrine 管理 DB I.使用 Composer 管理包時有什么問題?最近,我將所有軟件包更新為最新版本并將其發(fā)送到服務器,其他文件中沒有任何更改.更新后,我的網(wǎng)站顯示以下錯誤:

                  I'm working on a CMS based on Zend Framework 3.0 to manage a DB I with Doctrine. What is my problem when managing packages with composer? Recently, I updated all the packages to newest versions and sent it to server, nothing was changed in other files. After the update my site displayed the following error:

                  致命錯誤:未捕獲的類型錯誤:DoctrineCommonAnnotationsAnnotationRegistry::registerLoader() 的返回值必須是 DoctrineCommonAnnotationsvoid 的一個實例,在/home/platne/serwer18346/vendor/doctrine 中沒有返回/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php:117 堆棧跟蹤:#0/home/platne/serwer18346/vendor/doctrine/doctrine-module/src/DoctrineModule/Module.php(57): DoctrineCommonAnnotationsAnnotationRegistry::registerLoader(Object(Closure)) #1/home/platne/serwer18346/vendor/zendframework/zend-modulemanager/src/Listener/InitTrigger.php(33): DoctrineModuleModule->init(Object(ZendModuleManagerModuleManager)) #2/home/platne/serwer18346/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): ZendModuleManagerListenerInitTrigger->__invoke(Object(ZendModuleManager)ModuleEvent)) #3/home/platne/serwer18346/vendor/zendframework/zend-eventmanager/src/EventManager.php(171): ZendEventManagerEventManager->triggerListeners(Object(Zen)dModuleManagerModuleEvent)) #4/home/p in/home/platne/serwer18346/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php 117 行

                  Fatal error: Uncaught TypeError: Return value of DoctrineCommonAnnotationsAnnotationRegistry::registerLoader() must be an instance of DoctrineCommonAnnotationsvoid, none returned in /home/platne/serwer18346/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php:117 Stack trace: #0 /home/platne/serwer18346/vendor/doctrine/doctrine-module/src/DoctrineModule/Module.php(57): DoctrineCommonAnnotationsAnnotationRegistry::registerLoader(Object(Closure)) #1 /home/platne/serwer18346/vendor/zendframework/zend-modulemanager/src/Listener/InitTrigger.php(33): DoctrineModuleModule->init(Object(ZendModuleManagerModuleManager)) #2 /home/platne/serwer18346/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): ZendModuleManagerListenerInitTrigger->__invoke(Object(ZendModuleManagerModuleEvent)) #3 /home/platne/serwer18346/vendor/zendframework/zend-eventmanager/src/EventManager.php(171): ZendEventManagerEventManager->triggerListeners(Object(ZendModuleManagerModuleEvent)) #4 /home/p in /home/platne/serwer18346/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php on line 117

                  如果需要一些應用程序代碼:
                  模塊:

                  Some application code if needed:
                  modules:

                  return [
                      'ZendRouter',
                      'ZendValidator',
                      'DoctrineModule',
                      'DoctrineORMModule',
                      'Core',
                  ];
                  

                  development.local(開發(fā)者模式已激活):

                  development.local(developer mode is active):

                  'doctrine' => [
                          'connection' => [
                              'orm_default' => [
                                  'driverClass' => DoctrineDBALDriverPDOMySqlDriver::class,
                                  'params' => [
                                      'host' => '******',
                                      'user' => '*******',
                                      'password' => '******',
                                      'dbname' => '*******',
                                      'charset' => 'utf8'
                                  ]
                              ]
                          ]
                      ]
                  

                  module.config:

                  module.config:

                  'doctrine' => [
                          'driver' => [
                              __NAMESPACE__ . '_driver' => [
                                  'class' => AnnotationDriver::class,
                                  'cache' => 'array',
                                  'paths' => [__DIR__.'/../src/Model']
                              ],
                              'orm_default' => [
                                  'drivers' => [
                                      __NAMESPACE__ . 'Model' => __NAMESPACE__ . '_driver'
                                  ]
                              ]
                          ]
                      ]
                  

                  控制器工廠:

                  public function __invoke(ContainerInterface $container,$requestedName, array $options = null)
                  {
                      $controllerInstance = null;
                      switch($requestedName){
                          case 'CoreControllerIndexController': $controllerInstance = $this->_invokeIndex($container); break;
                          case 'CoreControllerPagesController': $controllerInstance = $this->_invokePages($container); break;
                      }
                      return $controllerInstance;
                  }
                  
                  protected function _invokeIndex(ContainerInterface $container)
                  {
                      return new ControllerIndexController(
                          $container->get('doctrine.entitymanager.orm_default')
                      );
                  }
                  
                  protected function _invokePages(ContainerInterface $container)
                  {
                      return new ControllerPagesController(
                          $container->get('doctrine.entitymanager.orm_default')
                      );
                  }
                  

                  控制器父級:

                   protected $_entityManager;
                  
                      /**
                       * AppController constructor.
                       * @param EntityManager $entityManager
                       */
                      public function __construct(EntityManager $entityManager)
                      {
                          $this->_entityManager = $entityManager;
                      }
                  
                      /**
                       * @return EntityManager
                       */
                      public function getEntityManager()
                      {
                          return $this->_entityManager;
                      }
                  

                  正如我所說,此代碼在更新前有效.更新后它向我顯示該錯誤,更重要的是在上傳以前的版本后錯誤仍然存??在.我嘗試重寫代碼,但效果相同.

                  As I said this code worked before update. After update it show me that error, what is more after uploading previous versions the error remains. I triead rewriting code but with the same effect.

                  作曲家(沒有項目數(shù)據(jù)):

                  Composer(without project data):

                  "require": {
                      "zendframework/zend-mvc": "*",
                      "zendframework/zend-developer-tools": "*",
                      "zendframework/zend-session": "*",
                      "zendframework/zend-authentication": "*",
                      "zfcampus/zf-development-mode": "*",
                      "doctrine/doctrine-orm-module": "*"
                    },
                    "autoload": {
                      "psr-4": {
                        "Core\": "module/Core/src/"
                      }
                    }
                  

                  推薦答案

                  這個錯誤是由最新版本的DoctrineCommonAnnotations使用PHP 7.1引起的.這就是為什么它使用 void 作為 return type.并且它在 PHP 7.0.* 上不受支持.這是PHP 7.1 中的新功能

                  This error caused by the latest version of DoctrineCommonAnnotations use PHP 7.1. That's why it use void as return type. And it is not supported on PHP 7.0.*. This is new feature in PHP 7.1

                  我在使用 PHP 7.0 的 ZF3 項目中使用 doctrine-orm-module 1.1.它運作良好.因此,只需將您的 doctrine-orm-module 版本替換為 1.1.

                  I use doctrine-orm-module 1.1 in my ZF3 project using PHP 7.0. And it work well. So, just replace your doctrine-orm-module version to 1.1.

                  "doctrine/doctrine-orm-module": "^1.1"
                  

                  我建議你定義你在 composer.json 中使用的依賴版本.這是為了讓你的項目在新版本的依賴發(fā)布時不會被破壞.

                  I suggest you to define the version of dependencies you used in composer. This is purposed to make your project not broken when new version of dependencies released.

                  這篇關(guān)于Doctrine2 更新導致 Zend Framework 3 中的 AnnotationRegistry registerLoader 錯誤的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術(shù)方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅(qū)動程序)
                  <i id='75JIK'><tr id='75JIK'><dt id='75JIK'><q id='75JIK'><span id='75JIK'><b id='75JIK'><form id='75JIK'><ins id='75JIK'></ins><ul id='75JIK'></ul><sub id='75JIK'></sub></form><legend id='75JIK'></legend><bdo id='75JIK'><pre id='75JIK'><center id='75JIK'></center></pre></bdo></b><th id='75JIK'></th></span></q></dt></tr></i><div class="5vjrfzl" id='75JIK'><tfoot id='75JIK'></tfoot><dl id='75JIK'><fieldset id='75JIK'></fieldset></dl></div>

                          <legend id='75JIK'><style id='75JIK'><dir id='75JIK'><q id='75JIK'></q></dir></style></legend>
                            <tbody id='75JIK'></tbody>

                          <small id='75JIK'></small><noframes id='75JIK'>

                        • <tfoot id='75JIK'></tfoot>

                            <bdo id='75JIK'></bdo><ul id='75JIK'></ul>

                            主站蜘蛛池模板: 耐磨焊丝,堆焊焊丝,耐磨药芯焊丝,碳化钨焊丝-北京耐默公司 | 猪I型/II型胶原-五克隆合剂-细胞冻存培养基-北京博蕾德科技发展有限公司 | 济南画室培训-美术高考培训-山东艺霖艺术培训画室 | 齿轮减速机_齿轮减速电机-VEMT蜗轮蜗杆减速机马达生产厂家瓦玛特传动瑞环机电 | 1000帧高速摄像机|工业高速相机厂家|科天健光电技术 | 广州活动策划公司-15+年专业大型公关活动策划执行管理经验-睿阳广告 | 广州食堂承包_广州团餐配送_广州堂食餐饮服务公司 - 旺记餐饮 | 利浦顿蒸汽发生器厂家-电蒸汽发生器/燃气蒸汽发生器_湖北利浦顿热能科技有限公司官网 | 佛山市钱丰金属不锈钢蜂窝板定制厂家|不锈钢装饰线条|不锈钢屏风| 电梯装饰板|不锈钢蜂窝板不锈钢工艺板材厂家佛山市钱丰金属制品有限公司 | 手持气象站_便携式气象站_农业气象站_负氧离子监测站-山东万象环境 | Maneurop/美优乐压缩机,活塞压缩机,型号规格,技术参数,尺寸图片,价格经销商 | 轴流风机-鼓风机-离心风机-散热风扇-罩极电机,生产厂家-首肯电子 | 油罐车_加油机_加油卷盘_加油机卷盘_罐车人孔盖_各类球阀_海底阀等车用配件厂家-湖北华特专用设备有限公司 | 防腐储罐_塑料储罐_PE储罐厂家_淄博富邦滚塑防腐设备科技有限公司 | 植筋胶-粘钢胶-碳纤维布-碳纤维板-环氧砂浆-加固材料生产厂家-上海巧力建筑科技有限公司 | 焊缝跟踪系统_激光位移传感器_激光焊缝跟踪传感器-创想智控 | 有声小说,听书,听小说资源库-听世界网 | 东莞工厂厂房装修_无尘车间施工_钢结构工程安装-广东集景建筑装饰设计工程有限公司 | 干式变压器厂_干式变压器厂家_scb11/scb13/scb10/scb14/scb18干式变压器生产厂家-山东科锐变压器有限公司 | 烟雾净化器-滤筒除尘器-防爆除尘器-除尘器厂家-东莞执信环保科技有限公司 | 四川职高信息网-初高中、大专、职业技术学校招生信息网 | 餐饮加盟网_特色餐饮连锁加盟店-餐饮加盟官网 | 北京中航时代-耐电压击穿试验仪厂家-电压击穿试验机 | 电磁铁_推拉电磁铁_机械手电磁吸盘电磁铁厂家-广州思德隆电子公司 | 高防护蠕动泵-多通道灌装系统-高防护蠕动泵-www.bjhuiyufluid.com慧宇伟业(北京)流体设备有限公司 | 临朐空调移机_空调维修「空调回收」临朐二手空调 | 专注提供国外机电设备及配件-工业控制领域一站式服务商-深圳市华联欧国际贸易有限公司 | 直齿驱动-新型回转驱动和回转支承解决方案提供商-不二传动 | 变色龙PPT-国内原创PPT模板交易平台 - PPT贰零 - 西安聚讯网络科技有限公司 | 东莞画册设计_logo/vi设计_品牌包装设计 - 华略品牌设计公司 | 济南侦探调查-济南调查取证-山东私家侦探-山东白豹调查咨询公司 密集架|电动密集架|移动密集架|黑龙江档案密集架-大量现货厂家销售 | 上海办公室装修公司_办公室设计_直营办公装修-羚志悦装 | 全自动真空上料机_粉末真空上料机_气动真空上料机-南京奥威环保科技设备有限公司 | 自动化改造_智虎机器人_灌装机_贴标机-上海圣起包装机械 | 空气能暖气片,暖气片厂家,山东暖气片,临沂暖气片-临沂永超暖通设备有限公司 | 代做标书-代写标书-专业标书文件编辑-「深圳卓越创兴公司」 | 游戏版号转让_游戏资质出售_游戏公司转让-【八九买卖网】 | PVC快速门-硬质快速门-洁净室快速门品牌厂家-苏州西朗门业 | 附着力促进剂-尼龙处理剂-PP处理剂-金属附着力处理剂-东莞市炅盛塑胶科技有限公司 | 盘扣式脚手架-附着式升降脚手架-移动脚手架,专ye承包服务商 - 苏州安踏脚手架工程有限公司 | 河南橡胶接头厂家,河南波纹补偿器厂家,河南可曲挠橡胶软连接,河南套筒补偿器厂家-河南正大阀门 |