laminas-ci-matrix-action icon indicating copy to clipboard operation
laminas-ci-matrix-action copied to clipboard

Composer `php` constraints with `,` are not supported

Open boesing opened this issue 2 years ago • 3 comments

Bug Report

Q A
Version(s) 1.11.5

Summary

When a component uses a more complex constraint which contains ,, the matrix is not able to infer supported PHP versions anymore.

Current behavior

Supported PHP versions are not detected at all.

How to reproduce

composer.json

{
    "require": {
        "php": ">=5.6,<=8.1.99"
    }
}

Expected behavior

All versions between PHP 5.6 and 8.1.99 are detected. As of writing this issue, this would be:

  • 5.6
  • 7.0
  • 7.1
  • 7.2
  • 7.3
  • 7.4
  • 8.0
  • 8.1

boesing avatar Apr 06 '22 23:04 boesing

Would a better way not be to just replace , with || or a space?

internalsystemerror avatar Aug 11 '22 15:08 internalsystemerror

@internalsystemerror , means AND, while || means OR :thinking:

Ocramius avatar Aug 11 '22 15:08 Ocramius

@Ocramius I've just been reviewing the semver guide on npm https://www.npmjs.com/package/semver and I believe , -> (space) would be the only transformation necessary

internalsystemerror avatar Aug 11 '22 15:08 internalsystemerror