Doctrine2 Update Caused AnnotationRegistry registerLoader Error in Zend Framework 3

前端 未结 5 1419
无人及你
无人及你 2021-01-01 22:47

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 packag

5条回答
  •  时光说笑
    2021-01-01 23:32

    This error caused by the latest version of Doctrine\Common\Annotations 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

    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"
    

    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.

提交回复
热议问题