FatalErrorException in Inflector.php line 265: syntax error, unexpected ':', expecting ';' or '{'

前端 未结 6 637
粉色の甜心
粉色の甜心 2020-12-14 01:56

I went to update composer using

composer update

after update having the following error:

FatalErrorException in Inf

6条回答
  •  失恋的感觉
    2020-12-14 02:39

    It's a PHP version issue, update to PHP 7.0 and doctrine/inflector will work properly because doctrine/inflector 1.20 and above require PHP 7.

    But if you want to stay at your current PHP version, you can downgrade the doctrine/inflector version by running the following commands:

    1. Delete the composer.lock file

      rm -f Composer.lock

    2. Delete the vendor

      rm -R -f vendor

    3. composer install

    4. Install the doctrine/inflector according to your php version

      composer require doctrine/inflector:1.1.0

    doctrine/inflector:1.1.0 supports PHP 5.6 & above. If you have another version of php, you can refer to this link

提交回复
热议问题