Repository navigation
v2.0.0
What's Changed
⚠️ Breaking Changes
- PHP >= 8.2 is now required (was ^8.1). PHP 8.1 reaches end of life on
December 31, 2025. RuleInterface::decide()signature changed to
decide(ParameterBagInterface $bag, mixed $params = null): bool.
Implementations receiving extra custom optional parameters (or variadics)
must be updated to accept the feature's config value as a singlemixed
argument. The value received is unchanged: the raw value declared in the
feature's configuration.- Rule classes (
Enabled,Partial,Unanimous,Custom) are now
final readonlyand cannot be extended. - The
Progressiveclass is nowfinal. Store::addCustom()stores rules asClosure. It still accepts any
callablein input, but aTypeErrormay surface where a callable was
previously kept as-is.
Added
- Native type declarations, readonly classes and constructor property
promotion throughout the library - PHPStan level 8 analysis, including checked-exception validation of the
public API (@throwsannotations) autoload-devPSR-4 mapping for tests
Changed
- Test suite upgraded from PHPUnit 9 to PHPUnit 11:
- test metadata migrated from docblocks to attributes (
#[DataProvider]) - data providers are now static, generator-based functions with named keys
- test metadata migrated from docblocks to attributes (
- php-cs-fixer ruleset refreshed
Fixed
- Misleading
@throwsannotations inParameterBagInterface(documented
LogicExceptionwhereParameterNotFoundExceptionis actually thrown) - Typo in
StoreInterface::addCustom()PHPDoc
Full Changelog: v1.2.2...v2.0.0