Skip to content

build(deps-dev): update brick/money requirement from ^0.11.1 to ^0.13.0#298

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/composer/brick/money-tw-0.13.0
Open

build(deps-dev): update brick/money requirement from ^0.11.1 to ^0.13.0#298
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/composer/brick/money-tw-0.13.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github Apr 6, 2026

Updates the requirements on brick/money to permit the latest version.

Release notes

Sourced from brick/money's releases.

0.13.0

💥 Breaking changes

  • MoneyBag can no longer be instantiated with new: its constructor is now private; use MoneyBag::zero() to create an empty instance
  • Money::convertedTo() now defaults to DefaultContext instead of $this's context
  • The following methods no longer accept null for the $context parameter:
    • CurrencyConverter::convert()
    • Money::of()
    • Money::ofMinor()
    • Money::zero()
    • Money::convertedTo()
  • Money::allocate() signature has changed: replace allocate(1, 2, 3) with allocate([1, 2, 3], AllocationMode::FloorToFirst) to keep the same behaviour as before
  • Money::allocateWithRemainder() has been removed: replace allocateWithRemainder(1, 2, 3) with allocate([1, 2, 3], AllocationMode::BlockSeparate) to keep the same behaviour as before
  • Money::split() signature has changed: replace split(3) with split(3, SplitMode::ToFirst) to keep the same behaviour as before
  • Money::splitWithRemainder() has been removed: replace splitWithRemainder(3) with split(3, SplitMode::Separate) to keep the same behaviour as before
  • The following methods now throw an exception when used on a Money with AutoContext:
    • quotient()
    • remainder()
    • quotientAndRemainder()
    • allocate()
    • split()
  • MoneyBag no longer retains zero-balance currencies after plus()/minus() operations
  • ExchangeRateProvider::getExchangeRate() signature has changed: it now accepts Currency instances, and returns BigNumber|null
  • CurrencyConversionException has been renamed to ExchangeRateException, with ExchangeRateProviderException and ExchangeRateNotFoundException subclasses
  • PdoProvider::setParameters() has been removed, use dimension bindings instead
  • PdoProvider constructor is now private, use PdoProvider::builder()->...->build() to create an instance
  • PdoProviderConfiguration has been removed, use PdoProvider::builder() instead
  • CurrencyConverter::convert() signature has changed: parameter $dimensions now comes before $context
  • CachedProvider::invalidate() has been removed, pass a PSR-16 cache implementation to the constructor if you need to invalidate the cache
  • MoneyComparator constructor now requires a ComparisonMode instance, explicitly pass an instance of PairwiseMode to keep the same behaviour as before
  • ConfigurableProvider is now immutable: setExchangeRate() has been removed, use ConfigurableProvider::builder()->addExchangeRate()->build() instead
  • The following methods now throw an exception when the exchange rate is negative or zero:
    • Money::convertedTo()
    • RationalMoney::convertedTo()
    • CurrencyConverter::convert()
    • CurrencyConverter::convertToRational()
  • The following methods now throw when performing same-currency operations with a rate different from 1:
    • Money::convertedTo()
    • RationalMoney::convertedTo()
  • Constructors and factory methods of library-internal exceptions are now @internal
  • Context methods are now @internal: userland code should only rely on constructors
  • Interfaces Context, Monetary, and MoneyException are now sealed: userland implementations are no longer supported
  • Built-in ExchangeRateProvider implementations now consistently return 1 for same-currency pairs

Deprecated methods removed:

  • AbstractMoney::to() has been removed, use toContext() instead
  • AbstractMoney::isAmountAndCurrencyEqualTo() has been removed, use isSameValueAs() instead
  • Money::total() has been removed, use sum() instead
  • Money::getUnscaledAmount() has been removed, use getAmount()->getUnscaledValue() instead

... (truncated)

Changelog

Sourced from brick/money's changelog.

0.13.0 - 2026-03-28

💥 Breaking changes

  • MoneyBag can no longer be instantiated with new: its constructor is now private; use MoneyBag::zero() to create an empty instance
  • Money::convertedTo() now defaults to DefaultContext instead of $this's context
  • The following methods no longer accept null for the $context parameter:
    • CurrencyConverter::convert()
    • Money::of()
    • Money::ofMinor()
    • Money::zero()
    • Money::convertedTo()
  • Money::allocate() signature has changed: replace allocate(1, 2, 3) with allocate([1, 2, 3], AllocationMode::FloorToFirst) to keep the same behaviour as before
  • Money::allocateWithRemainder() has been removed: replace allocateWithRemainder(1, 2, 3) with allocate([1, 2, 3], AllocationMode::BlockSeparate) to keep the same behaviour as before
  • Money::split() signature has changed: replace split(3) with split(3, SplitMode::ToFirst) to keep the same behaviour as before
  • Money::splitWithRemainder() has been removed: replace splitWithRemainder(3) with split(3, SplitMode::Separate) to keep the same behaviour as before
  • The following methods now throw an exception when used on a Money with AutoContext:
    • quotient()
    • remainder()
    • quotientAndRemainder()
    • allocate()
    • split()
  • MoneyBag no longer retains zero-balance currencies after plus()/minus() operations
  • ExchangeRateProvider::getExchangeRate() signature has changed: it now accepts Currency instances, and returns BigNumber|null
  • CurrencyConversionException has been renamed to ExchangeRateException, with ExchangeRateProviderException and ExchangeRateNotFoundException subclasses
  • PdoProvider::setParameters() has been removed, use dimension bindings instead
  • PdoProvider constructor is now private, use PdoProvider::builder()->...->build() to create an instance
  • PdoProviderConfiguration has been removed, use PdoProvider::builder() instead
  • CurrencyConverter::convert() signature has changed: parameter $dimensions now comes before $context
  • CachedProvider::invalidate() has been removed, pass a PSR-16 cache implementation to the constructor if you need to invalidate the cache
  • MoneyComparator constructor now requires a ComparisonMode instance, explicitly pass an instance of PairwiseMode to keep the same behaviour as before
  • ConfigurableProvider is now immutable: setExchangeRate() has been removed, use ConfigurableProvider::builder()->addExchangeRate()->build() instead
  • The following methods now throw an exception when the exchange rate is negative or zero:
    • Money::convertedTo()
    • RationalMoney::convertedTo()
    • CurrencyConverter::convert()
    • CurrencyConverter::convertToRational()
  • The following methods now throw when performing same-currency operations with a rate different from 1:
    • Money::convertedTo()
    • RationalMoney::convertedTo()
  • Constructors and factory methods of library-internal exceptions are now @internal
  • Context methods are now @internal: userland code should only rely on constructors
  • Interfaces Context, Monetary, and MoneyException are now sealed: userland implementations are no longer supported
  • Built-in ExchangeRateProvider implementations now consistently return 1 for same-currency pairs

Deprecated methods removed:

  • AbstractMoney::to() has been removed, use toContext() instead
  • AbstractMoney::isAmountAndCurrencyEqualTo() has been removed, use isSameValueAs() instead
  • Money::total() has been removed, use sum() instead

... (truncated)

Commits
  • 5d657ba Prepare for release
  • cd36551 Update README
  • ef0d0f1 Update CHANGELOG
  • 49ea00d Add tests for object normalizers in CacheKeyGeneratorTest
  • d04fe4e Catch object normalizer exceptions
  • 1264d7d Improve docs
  • 01d62f7 Reject duplicate exchange rates in ConfigurableProviderBuilder
  • 10208a9 Seal MoneyException
  • baecbbc Seal ComparisonMode
  • c407848 Mark Context methods as internal
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [brick/money](https://github.com/brick/money) to permit the latest version.
- [Release notes](https://github.com/brick/money/releases)
- [Changelog](https://github.com/brick/money/blob/main/CHANGELOG.md)
- [Commits](brick/money@0.11.1...0.13.0)

---
updated-dependencies:
- dependency-name: brick/money
  dependency-version: 0.13.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file php Pull requests that update Php code labels Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants