Test against the whole supported range, not one combination - #5
Merged
Conversation
CI ran a single cell: PHP 8.2 with composer.lock. composer.json allows PHP ^8.2 and tuupola/base62 ^2.1, so most of what consumers can resolve to was never executed -- including the lower bounds, which is where an overly loose constraint hides. Adds a 9-cell matrix: PHP 8.2-8.5 x (locked, highest), plus prefer-lowest on the minimum PHP. Code quality stays single-version and says why.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Tests workflow ran exactly one combination: PHP 8.2 with
composer.lock. Butcomposer.jsonacceptsphp: ^8.2andtuupola/base62: ^2.1, so almost everything a consumer can resolve to was never executed — newer PHP, newer dependencies, and above all the lower bounds. A^constraint that is too loose is invisible until someone installs the oldest allowed version, and nothing here would have caught it.What
php-unit.ymlgets a 9-cell matrix — PHP8.2 / 8.3 / 8.4 / 8.5× dependencieslocked / highest, plusloweston the minimum PHP:lockedcomposer installhighestcomposer updatelowestcomposer update --prefer-lowest --prefer-stablelowestruns on PHP 8.2 only — pairing the oldest dev tooling with the newest PHP tests the tooling, not this library.fail-fast: false, so one bad cell does not hide the rest, and the cache key and concurrency group now include the matrix values.php-stan.ymlstays single-version, with a comment saying why: PHPStan and php-cs-fixer judge the source, not the runtime, so four PHP versions would repeat one verdict.Verified locally
composer update --prefer-lowest --prefer-stableresolvestuupola/base62to2.1.0; all 139 tests pass against it.One finding worth acting on separately:
tuupola/base622.1.0 triggers a PHP 8.5 deprecation (Non-canonical cast (integer) is deprecated,BaseEncoder.php:154), fixed in the locked2.1.1. The matrix does not go red —lowestruns on 8.2, and there is nofailOnDeprecation— but^2.1does let a consumer on PHP 8.5 resolve to a version that warns. Tightening the constraint to^2.1.1would close that; happy to do it in a follow-up.