icon PHP7.3 で compser install できない (2019/04/29)
PHP7.3 で break と continue の取り扱いが変更になった影響で、composer install がエラーになる場合、
  • PHP7.2にさげる
  • composer のバージョンをあげる
    $ composer global require "laravel/installer"
    Changed current directory to /home/yoo/.config/composer
    Using version ^2.0 for laravel/installer
    ./composer.json has been created
    Loading composer repositories with package information
    Updating dependencies (including require-dev)

    Installation failed, deleting ./composer.json.

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

    require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] []...
    特に初期設定で composer のバージョンが低い場合は注意が必要
    (composer self-udpate がないなど)
    composer installができなくなった時の解決法(PHP7.3)

    PHP7.2 に変更

    $ sudo update-alternatives --config php
    選択肢 パス 優先度 状態
    *0 /usr/bin/php7.3 73 自動モード
    1 /usr/bin/php5 50 手動モード
    2 /usr/bin/php7.0 70 手動モード
    3 /usr/bin/php7.2 72 手動モード
    4 /usr/bin/php7.3 73 手動モード


    composer-setup.php をダウンロード・実行する
    $ curl -sS https://getcomposer.org/installer | php
    $ HASH=544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061
    $ sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
    $ composer -V
    Composer version 1.8.5 2019-04-09 17:46:47