Composer: improve version constraints for Mockery and improve CI #174
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.
Composer: improve version constraints for Mockery
This commit improves the version constraints for the
mockery/mockerypackage by only allowing the highest point release of outdated minors (which are still needed for older PHP versions) and only allowing a wider range of versions for the current minor.Notes:
v1.6.0 also explicitly marks support for PHP <= 8.0 as deprecated, while v1.6.5 brings back support for PHP 7.3.
If we then look at the Mockery changelog:
1.3.6contains an essential fix for compatibility with PHP 8.2.1.5.1, as well a feature support for PHP 8.1 intersection types.1.6.1contains feature support for PHP 8.2 stand-alonenulltypes, improved handling of PHP 8.1 intersection types and improved handling of dynamic properties (PHP 8.2 deprecation).1.6.2contains feature support for PHP 8.0 stand-alonefalsetype and PHP 8.2 stand-alonetruetype.1.6.3adds support for mocking classes using PHP 8.1 "new in initializers".1.6.5adds support for mocking classes using PHP 8.2 disjunctive normal form types.1.6.10contains an essential fix for compatibility with PHP 8.4.Ref: https://github.com/mockery/mockery/blob/1.6.x/CHANGELOG.md
GH Actions: improve test workflow
The builds against PHP 8.4, 8.5 and 8.6 were so far only run against the "highest" (stable) versions of dependencies due to running the tests with
--prefer-lowestrunning into trouble.With the analysis I did for improving the Mockery version constraints in the
composer.jsonfile as per the previous commit, I've identified Mockery1.6.10as the lowest viable version to run the tests with for PHP 8.4, 8.5 and 8.6.This commit changes the workflow to allow a certain form of running against "lowest" dependencies for PHP 8.4, 8.5, 8.6, by explicitly setting the "low" version of Mockery to
1.6.10.