terminus
terminus copied to clipboard
error: "continue" targeting switch is equivalent to "break"
Expected behavior
install of terminus
Actual behavior
[ErrorException] "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
Steps to reproduce the behavior
I think this is relate to a new version of PHP. After an update I started seeing the above message as a warning in vs code phpcs (the php linter). VS Code gave me the file and lines to fix it by changing "continue" to "continue 2" in a switch statement nested in a foreach loop.
My current system Linux Mint 18.1 Serena PHP 7.3.0RC3 (cli) (built: Oct 15 2018 11:36:28) ( NTS ) composer version 1.4.2
installed cli modules [PHP Modules] bz2 calendar Core ctype curl date dom exif fileinfo filter ftp gd gettext hash iconv json libxml mbstring memcache mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql Phar posix readline Reflection session shmop SimpleXML sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter xsl Zend OPcache zlib
[Zend Modules] Zend OPcache
------------------------------------------------ Instructions
~ mkdir terminus ~ $ cd terminus/ ~/terminus $ curl -O https://raw.githubusercontent.com/pantheon-systems/terminus-installer/master/builds/installer.phar && php installer.phar install
------------------------------------------------ output ` % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 3198k 100 3198k 0 0 3151k 0 0:00:01 0:00:01 --:--:-- 3154k Installing Terminus... Using version ^1.9 for pantheon-systems/terminus ./composer.json has been created Loading composer repositories with package information Updating dependencies (including require-dev)
Installation failed, deleting ./composer.json.
[ErrorException]
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--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] [--apcu-autoloader] [--] [
Terminus was installed, but the installer was not able to write to your bin dir. To enable the
terminus command, add this alias to your .bash_profile (Mac) or .bashrc (Linux) file:
alias terminus=/home/cjokinen/terminus/vendor/bin/terminus
Or you can enable it by adding the directory the executable file is in to your path:
PATH="/home/cjokinen/terminus/vendor/bin:$PATH" `
------------------------------------------- after I checked and now terminus was installed.
I have the same error on Ubuntu 18.10.
Try: $composer self-update
I think this is a PHP 7.3 bug and terminus is not usable there. Seems like a big-ish issue now its GAed.
https://git.mtech-llc.com/open-source/drupal-docker/-/jobs/2942 => shows the full log of requiring this on php 7.3. Along with the version of composer, etc.
https://github.com/pantheon-systems/terminus-installer/pull/36 seems to fix this.
Terminus itself seems to work fine with php 7.3.
Any update on this? I'm not familiar with PHP and am unable to install Terminus due to this. The potential fix above still hasn't been merged. This version of PHP is the default in Homebrew and I imagine other package managers as well.