Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8 compat #35

Open
XedinUnknown opened this issue Mar 9, 2021 · 0 comments
Open

PHP 8 compat #35

XedinUnknown opened this issue Mar 9, 2021 · 0 comments

Comments

@XedinUnknown
Copy link

XedinUnknown commented Mar 9, 2021

The Problem

The package cannot be installed on PHP 8 from master, producing the following error:

Error: Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - webmozart/path-util is locked to version dev-master and an update of this package was not requested.
    - webmozart/path-util dev-master requires php ^5.3.3|^7.0 -> your php version (8.0.2) does not satisfy that requirement.
  Problem 2
    - webmozart/path-util dev-master requires php ^5.3.3|^7.0 -> your php version (8.0.2) does not satisfy that requirement.
    - webmozart/path-util 2.3.x-dev is an alias of webmozart/path-util dev-master and thus requires it to be installed too.
    - webmozart/path-util is locked to version 2.3.x-dev and an update of this package was not requested.

  Problem 1
    - webmozart/path-util is locked to version dev-master and an update of this package was not requested.
    - webmozart/path-util dev-master requires php ^5.3.3|^7.0 -> your php version (8.0.2) does not satisfy that requirement.
  Problem 2
    - webmozart/path-util dev-master requires php ^5.3.3|^7.0 -> your php version (8.0.2) does not satisfy that requirement.
    - webmozart/path-util 2.3.x-dev is an alias of webmozart/path-util dev-master and thus requires it to be installed too.
    - webmozart/path-util is locked to version 2.3.x-dev and an update of this package was not requested.

Error: Process completed with exit code 2.

Possible Cause

2.3 declares compatibility from PHP 5.3.3 to infinity, implicitly allowing PHP 8.
master removes this compatibility by declaring ^5.3.3|^7.0.

Suggested Solution

Explicitly declare compatibility with PHP 8, e.g. ^5.3.3|^7.0|^8.0.

Remarks

While the point of the solution to explicitly add PHP 8.0 to the list of supported versions stands, I am not entirely sure that it is possible to resolve dependencies to any list of constraints that will support both PHP 5.3 and PHP 8.

Therefore, the solution may be also the followig:

  1. Add a new branch 2.3.x, and keep the current constraint ^5.3.3|^7.0 there.
  2. Rewind master to 2.3.0, because dev-master is supposed to represent the latest stable version. This is important, because otherwise lower stability in dependants breaks everything.
  3. Add a new branch e.g. 2.4.x, and declare ^7.0|^8.0 there (or a higher version, like 7.1 or 7.2 even, because unless you composer update on CI, there is no single PHPUnit version that can support the whole range of declared PHP versions).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant