Skip to content

Allow brick math 0.15 and 0.16#633

Open
BackEndTea wants to merge 1 commit intoramsey:4.xfrom
BackEndTea:brick-math
Open

Allow brick math 0.15 and 0.16#633
BackEndTea wants to merge 1 commit intoramsey:4.xfrom
BackEndTea:brick-math

Conversation

@BackEndTea
Copy link
Copy Markdown
Contributor

0.15 removed the 'old' rounding mode constants, so this includes a BC layer in the BrickMathCalculator

Description

This MR allows installation of brick math versions 0.15 and 0.16.

0.14 changed the rounding mode to an enum, but kept backwards compatability. in 0.15 this BC layer was removed.

To support older brick/math versions (and older PHP versions), we introduce a BC layer in the BrickMathCalculator class.

Motivation and context

How has this been tested?

I have ran the phpunit tests with brick/math 0.14, 0.15 and 0.16.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

PR checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • I have added tests to cover my changes.

PHPUnit test are working for this MR, but there are some PHPStan failures. I'm not sure how to move forward with those.

0.15 removed the 'old' rounding mode constants, so this includes a BC layer in the `BrickMathCalculator`
@balu-lt
Copy link
Copy Markdown

balu-lt commented Mar 12, 2026

After creating PR #634 for the 5.x branch, I noticed you had already opened this PR for the 4.x branch.

By the way, is there an ETA for the v5 release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants