Broken composer after update
millsoft opened this issue · 4 comments
Hi,
today I performed a composer update and some libraries were also requiring PackageVersions.
After the install I can't use composer anymore. If I execute composer I get this:
PHP Parse error: syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /home/michael/Dev/twm/vendor/ocramius/package-versions/src/PackageVersions/Installer.php on line 34
I am using php 7.3:
╰─ php --version
PHP 7.3.11-0ubuntu0.19.10.3 (cli) (built: Feb 12 2020 15:22:33) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.11-0ubuntu0.19.10.3, Copyright (c) 1999-2018, by Zend Technologies
Composer:
Composer version 1.9.2 2020-01-14 16:30:31
I tried this on multiple machines with similar configuration (all with php 7.3)
To downgrade I need to remove the vendor directory, revert previous composer.lock and do a composer install.
the dependency tree is:
- sentry/sdk (2.1.0)
- sentry/sentry (2.3)
- jean85/pretty-package-versions (1.2)
- ocramius/package-versions (1.7.0)
- jean85/pretty-package-versions (1.2)
- sentry/sentry (2.3)
Yep, indeed a duplicate of #105 - the fact that you managed to install ocramius/package-versions
on a PHP 7.3 system indicates that you probably used --ignore-platform-reqs
.
the same happened to me today in Symfony Insight:
in your opinion, is this a configuration error on their end (I use their default configuration, whatever that might be)? I find it hard to believe that they would use --ignore-platform-reqs
, especially since there was never any problem related to that so far, but who knows..