“继续”定位开关等效于php 7.3下的“中断”错误

时间:2019-05-13 14:55:46

标签: php laravel composer-php ubuntu-16.04 php-7.3

我在Digital Ocean下的新Ubuntu 16实例上安装了laravel 5.8。 我需要安装php 7.2,为此,我运行命令:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update 
sudo apt-get remove php7.0
sudo apt-get install php7.2

我为找到php 7.3感到非常惊讶:

# php -v
PHP 7.3.5-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: May  3 2019 10:00:05) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.5, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.5-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

此后,我在安装作曲家时出错:

# composer  install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file


  [ErrorException]                                                                         
  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?  

谷歌搜索我发现这是一些特定的php7.3错误,我想知道可以在这里做出决定吗? 降级到php7.2(如果是,如何做得更好?)

还是其他决定?

谢谢!

1 个答案:

答案 0 :(得分:0)

我已升级到PHP 7.3,请尝试

  sudo wget https://getcomposer.org/download/1.8.0/composer.phar -O /usr/local/bin/composer && sudo chmod 755 /usr/local/bin/composer

这只是版本依赖性。 PHP 7.3

composer update有用!