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>

                            主站蜘蛛池模板: 沈阳液压泵_沈阳液压阀_沈阳液压站-沈阳海德太科液压设备有限公司 | 皮带式输送机械|链板式输送机|不锈钢输送机|网带输送机械设备——青岛鸿儒机械有限公司 | 浇钢砖,流钢砖_厂家价低-淄博恒森耐火材料有限公司 | 云南成人高考网| 金属回收_废铜废铁回收_边角料回收_废不锈钢回收_废旧电缆线回收-广东益夫金属回收公司 | 并网柜,汇流箱,电控设备,中高低压开关柜,电气电力成套设备,PLC控制设备订制厂家,江苏昌伟业新能源科技有限公司 | 体检车_移动CT车_CT检查车_CT车_深圳市艾克瑞电气有限公司移动CT体检车厂家-深圳市艾克瑞电气有限公司 | 有机肥设备生产制造厂家,BB掺混肥搅拌机、复合肥设备生产线,有机肥料全部加工设备多少钱,对辊挤压造粒机,有机肥造粒设备 -- 郑州程翔重工机械有限公司 | 【甲方装饰】合肥工装公司-合肥装修设计公司,专业从事安徽办公室、店面、售楼部、餐饮店、厂房装修设计服务 | 搜木网 - 木业全产业链交易平台,免费搜货、低价买货! | 耐酸碱胶管_耐腐蚀软管总成_化学品输送软管_漯河利通液压科技耐油耐磨喷砂软管|耐腐蚀化学软管 | 牛皮纸|牛卡纸|进口牛皮纸|食品级牛皮纸|牛皮纸厂家-伽立实业 | 东莞螺丝|东莞螺丝厂|东莞不锈钢螺丝|东莞组合螺丝|东莞精密螺丝厂家-东莞利浩五金专业紧固件厂家 | PVC快速门-硬质快速门-洁净室快速门品牌厂家-苏州西朗门业 | 泰国试管婴儿_泰国第三代试管婴儿费用|成功率|医院—新生代海外医疗 | 好笔杆子网 - 公文写作学习交流分享平台 | 压缩空气冷冻式干燥机_吸附式干燥机_吸干机_沪盛冷干机 | 【德信自动化】点胶机_全自动点胶机_自动点胶机厂家_塑料热压机_自动螺丝机-深圳市德信自动化设备有限公司 | 黑田精工电磁阀-CAMMOZI气缸-ROSS电磁-上海茂硕机械设备有限公司 | LNG鹤管_内浮盘价格,上装鹤管,装车撬厂家-连云港赛威特机械 | 涂层测厚仪_光泽度仪_uv能量计_紫外辐照计_太阳膜测试仪_透光率仪-林上科技 | 赛默飞Thermo veritiproPCR仪|ProFlex3 x 32PCR系统|Countess3细胞计数仪|371|3111二氧化碳培养箱|Mirco17R|Mirco21R离心机|仟诺生物 | 龙门加工中心-数控龙门加工中心厂家价格-山东海特数控机床有限公司_龙门加工中心-数控龙门加工中心厂家价格-山东海特数控机床有限公司 | 体视显微镜_荧光生物显微镜_显微镜报价-微仪光电生命科学显微镜有限公司 | 开业庆典_舞龙舞狮_乔迁奠基仪式_开工仪式-神挚龙狮鼓乐文化传媒 | 日本细胞免疫疗法_肿瘤免疫治疗_NK细胞疗法 - 免疫密码 | 江苏齐宝进出口贸易有限公司 | 干粉砂浆设备-干粉砂浆生产线-干混-石膏-保温砂浆设备生产线-腻子粉设备厂家-国恒机械 | 带压开孔_带压堵漏_带压封堵-菏泽金升管道工程有限公司 | ERP企业管理系统永久免费版_在线ERP系统_OA办公_云版软件官网 | 上海租奔驰_上海租商务车_上海租车网-矢昂汽车服务公司 | 振动时效_振动时效仪_超声波冲击设备-济南驰奥机电设备有限公司 北京宣传片拍摄_产品宣传片拍摄_宣传片制作公司-现像传媒 | 电子海图系统-电梯检验系统-智慧供热系统开发-商品房预售资金监管系统 | 深圳美安可自动化设备有限公司,喷码机,定制喷码机,二维码喷码机,深圳喷码机,纸箱喷码机,东莞喷码机 UV喷码机,日期喷码机,鸡蛋喷码机,管芯喷码机,管内壁喷码机,喷码机厂家 | 连续油炸机,全自动油炸机,花生米油炸机-烟台茂源食品机械制造有限公司 | 手机存放柜,超市储物柜,电子储物柜,自动寄存柜,行李寄存柜,自动存包柜,条码存包柜-上海天琪实业有限公司 | 重庆监控_电子围栏设备安装公司_门禁停车场管理系统-劲浪科技公司 | 微水泥_硅藻泥_艺术涂料_艺术漆_艺术漆加盟-青岛泥之韵环保壁材 武汉EPS线条_EPS装饰线条_EPS构件_湖北博欧EPS线条厂家 | 企小优-企业数字化转型服务商_网络推广_网络推广公司 | 烽火安全网_加密软件、神盾软件官网 | TTCMS自助建站_网站建设_自助建站_免费网站_免费建站_天天向上旗下品牌 |