You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The changes made for #2386 introduces some »overhead« in order to maintain backward compatibility. For the next major release (probably version 7) PHPUnit\Util\Test allows some backward incompatible improvements.
Suggested updates
Combine both regular expressions PHPUnit\Util\Test::REGEX_REQUIRES_VERSION and PHPUnit\Util\Test::REGEX_REQUIRES_VERSION_CONSTRAINT to cover all possible version constraints
Combine the structure of the requirements array created by PHPUnit\Util\Test::getRequirements(): $requirements['PHP_constraint'] and $requirements['PHP']
Rely on phar-io/version API to handle version compliance check for every possible case
Sorry, it seems that I was to optimistic with my proposal.
Rely on phar-io/version API to handle version compliance check for every possible case
Right now, it can only compare constraints that contains the caret or tilde operator. Thus, there won't be much benefit in changing Tests::getRequirements() as Tests::getMissingRequirements() would still need to make a difference between constraints like >=7.0 and ^7.0.
I'll have a more detailed look into phar-io/version and maybe suggest an improvement over there. Suggest to close this ticket right now.
The changes made for #2386 introduces some »overhead« in order to maintain backward compatibility. For the next major release (probably version 7)
PHPUnit\Util\Test
allows some backward incompatible improvements.Suggested updates
PHPUnit\Util\Test::REGEX_REQUIRES_VERSION
andPHPUnit\Util\Test::REGEX_REQUIRES_VERSION_CONSTRAINT
to cover all possible version constraintsPHPUnit\Util\Test::getRequirements()
:$requirements['PHP_constraint']
and$requirements['PHP']
phar-io/version
API to handle version compliance check for every possible caseUpdate
Related pull request: #2623
The text was updated successfully, but these errors were encountered: