Support brick/money 0.14 - #3
Merged
Merged
Conversation
brick/money removed two APIs this package relied on. Currency::is() is gone in favour of isEqualTo(), and money comparisons no longer accept floats — so the float member is dropped from the four endpoint comparison signatures. A float was never a safe way to ask a monetary question; callers pass Money, BigNumber, int or a numeric string. Two unrelated fixes fall out of the newer toolchain: - The named groups leftEndpoint and rightEndpoint always exist, because the trailing group closingSymbol is always matched, so the ?? null on each was dead. Unmatched groups arrive as '' and the emptiness checks below already handle that. - isEqualTo compared three components but no test varied a single endpoint, leaving a surviving mutant that weakened the endpoint conjunction to a disjunction. Two assertions now pin intervals that share one endpoint and differ in the other. PHPUnit is pinned because 12.5.33 rejects the "-d --min-coverage" form that phpunit-coverage-tools documents for its coverage threshold. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Moves
brick/moneyfrom^0.10.1to^0.14.1, which is what a consumer on a current framework needs.brick removed two APIs this package relied on:
Currency::is()is gone in favour ofisEqualTo().floatmember is dropped from the four endpoint comparison signatures. A float was never a safe way to ask a monetary question; callers passMoney,BigNumber,int, or a numeric string.That signature change is why the release is 0.2.0.
Two fixes fall out of the newer toolchain:
leftEndpoint/rightEndpointalways exist, because the trailing groupclosingSymbolis always matched, so the?? nullon each was dead. Unmatched groups arrive as''and the emptiness checks below already handle that.isEqualTocompared three components but no test varied a single endpoint, leaving a surviving mutant that weakened the endpoint conjunction to a disjunction. Two assertions now pin intervals that share one endpoint and differ in the other.PHPUnit is capped below 12.5.12, which rejects the
-d --min-coverageformphpunit-coverage-toolsdocuments for its threshold.Verified: PHPStan clean, 62 tests, 100% coverage, MSI 100%.