Checks prefer-lowest installation for actually defined min versions in composer.json
MIT License
Support "composer/semver": "^1.4 || ^2.0 || ^3.0"
Note: Now PHP 7.3+
Published by dereuromark about 3 years ago
Support a min/max range of e.g. "^4.2.12 < 4.3.0 || ^4.3.8 || ^5.0.0"
.
The first is internally translated to "[== 4.2.12.0 < 4.3.0.0-dev]"
and therefore needs special treatment.
Published by dereuromark about 3 years ago
PHP 7.2+ with types added and PHP 8 checking in CI.
From using side nothing should change or be an issue if you use a high enough PHP version to run this tool.
Published by dereuromark over 3 years ago
Fixed wildcard parsing.
Published by dereuromark over 4 years ago
Fixed range parsing.
Published by dereuromark over 4 years ago
Published by dereuromark almost 5 years ago
Add --majors-only
/-m
option to be able to only fail on major issues.
Published by dereuromark over 5 years ago
Skip also dev-...
aliased branches. We are mainly interested in stable releases here.
Published by dereuromark almost 6 years ago
When declared both in require and require-dev, this issues just a warning, not an error.
The build will not fail, as this seems to be intentional (to make prefer-lowest pass here).
Still a valid warning, as this way it is impossible to test the promised minimum.
Consider injecting the require-dev dependency in Travis more dynamically where needed.
Published by dereuromark almost 6 years ago
Fixed output of errors in CLI.
Published by dereuromark almost 6 years ago
Try it out :)
E.g. for Travis CI:
php:
- ...
- 7.3
env:
global:
- DEFAULT=1
matrix:
include:
- php: 5.6
env: PREFER_LOWEST=1
before_script:
- if [[ $PREFER_LOWEST != 1 ]]; then composer install --prefer-source --no-interaction; fi
- if [[ $PREFER_LOWEST == 1 ]]; then composer update --prefer-lowest --prefer-dist --prefer-stable --no-interaction; fi
- if [[ $PREFER_LOWEST == 1 ]]; then composer require --dev dereuromark/composer-prefer-lowest; fi
script:
- if [[ $DEFAULT == 1 ]]; then vendor/bin/phpunit; fi
- if [[ $PREFER_LOWEST == 1 ]]; then vendor/bin/validate-prefer-lowest; fi