[5.x] Upgrade brick/math to support versions ^0.14.2–^0.17#634
Conversation
brick/math to support versions ^0.14.2, ^0.15, and ^0.16brick/math to support versions ^0.14.2, ^0.15, and ^0.16
brick/math to support versions ^0.14.2, ^0.15, and ^0.16brick/math to support versions ^0.14.2–^0.17
|
@ramsey really sorry to bother you but is it possible to merge this anytime soon? There are multiple PR open for the same issue, one starting february. If you need any help please let me know! |
|
Was this intended to be made to the |
Never mind. I see why you did this. It's because you've set the minimum brick/math to 0.14.2. Are you able to clean up the static analysis errors? |
Yes, I targeted the I’ve fixed the errors as well. |
|
With #638 merged I guess this is now obsolete? Or otherwise could be just a refactoring to remove the compatibility layer introduced there and solely support the newer |
Description
This PR upgrades the
brick/mathdependency and updates the codebase to use the new rounding mode constants introduced in version 0.14.2.The
5.xbranch was targeted to keep the implementation clean and avoid legacy constraints.Key changes:
composer.jsonto requirebrick/math^0.14.2 || ^0.15 || ^0.16 || ^0.17, dropping support for^0.11–^0.13.Brick\Math\RoundingModeconstants from SCREAMING_SNAKE_CASE (deprecated) to PascalCase (e.g.,HALF_UP->HalfUp).BrickMathCalculatorTestto handle variations in exception messages between differentbrick/mathversions.Ramsey\Uuid\Type\Time::toString()to ensure it returns anumeric-string, addressing a PHPStan static analysis error.Motivation and context
brick/math0.14.2 introduced PascalCase constants and deprecated the old ones. The old constants are removed in version 0.15. This update ensures the library remains compatible with current and future versions of the dependency. Additionally, it fixes a type-hinting issue reported by PHPStan in theTimeclass.How has this been tested?
vendor/bin/phpunitto ensure all functionality remains intact.composer dev:analyzeto verify the fix insrc/Type/Time.php.brick/math(0.14.2) in the CI environment.Types of changes
PR checklist