Conversation
- composer.json: bump php to ^8.2, phpunit to ^11 - Native property types, constructor promotion, final readonly classes - Store custom rules as Closure (converts callable via first-class callables) - Migrate test suite: PHPUnit 11 attributes, static providers, generator-based data sets with named keys
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.
Summary
Modernizes the library for PHP >= 8.2,
and raises the internal quality tooling accordingly.
RuleInterface::decide()signature unified: nowdecide(ParameterBagInterface $bag, mixed $params = null): bool.Implementations must accept the config value as a single
mixedargument instead of custom optional parameters(
bool $value = false,array $rules = [], variadics...). Runtime behavior is unchanged: the raw config valueis passed as-is, whatever its type.
Customrules store the callable as aClosure(converted internally via first-class callables — public APIs still acceptcallable)final readonly;Progressiveisfinalsrc/Changed
php ^8.2,phpunit ^11,php-cs-fixer ^3.26autoload-devPSR-4 mapping for tests (Progressive\Tests\)#[DataProvider]), data providers are staticgenerator-based functions with named keys
Added
src/andtests/@throwsdocumentation of the public API (ValidateException,RuleNotFoundException,ParameterNotFoundException)