Skip to content

Releases: PostScripton/laravel-money

v4.1.1

23 Jun 08:45
Compare
Choose a tag to compare

Added

  • @throws notaions to PHPDocs in the remaining methods (#149)

v4.1.0

08 Mar 18:47
Compare
Choose a tag to compare

Changed

  • Improved static min(), max(), avg() and sum() methods. They take a collection as their first argument as well (#145)

Added

  • JSON serialization to Money (#142)
  • zero() method to Money (#144)
  • Blueprint macros money and unsingedMoney by @folez (#131)
  • Native calculator, in case, the BcMath extension is not loaded (#146)
  • negate() method to Money and Calculators (#147)

New Contributors


Full Changelog: v4.0.0...v4.1.0

v4.0.0

22 Jan 17:17
0013b64
Compare
Choose a tag to compare

Version 4 is out 🎉🎊

It's been a long time since the last major version. We've been using version 3 a lot, however, I've had enough time to reconsider and refactor the vast majority of functionality. Here are the changes:

Changed

  • Minimum PHP version is now 8.1 (#64)
  • Minimum Guzzle version is now 7.5 (40005b0)
  • Renamed multiple() method to multiply() in Money class (#65)
  • Objects manipulate with other objects, not numbers (#66)
  • Raising precision (#70)
  • Renamed Money::make() to Money::of() (#78)
  • equals() is now comparing amounts and currencies with the strict mode on (#79)
  • getCurrency() and setCurrency() have been moved to Money class (#86)
  • New Currencies class to work with collections of currencies (#93)
  • Reworked parser (#97)
  • Most exceptions have been refactored (#102, #139)
  • difference() method now returns an absolute Money object, not a string (#106)
  • Renamed Currency::getConfigCurrency() to Currency::getConfigCurrencyCode() (564a7f2)
  • Accept strings as currencies in most places (b8f1d05)
  • Renamed isEmpty() to isZero() in Money class (#122)
  • Nest settings that are related to formatting to the corresponding key in the config file (#128)
  • Refactored Services to RateExchangers (ExchangeRatesAPI has been replaced with Fixer as well) (#130)

Removed

  • MoneySettings have gone (#114)
  • Currency list methods (#90)
  • Currency::getConfigCurrency() (564a7f2, a0a9296)

Fixed

  • Custom currencies from the config file should override pre-defined currencies (#87)
  • Cast to null no longer causes the error (#104)

Added

  • Formatters in replacement of MoneySettings (#114)
  • CurrencyList, CurrencyPosition, and CurrencyPosition enums (#91)
  • absolute() method (#107)
  • money_parse() helper function (#109)
  • BcMath for calculations (#118)
  • Currency::get() and Currency::getOrDefault() (917c98e)
  • Currencies::same() checks that all passed currencies are the same (#124)
  • isDifferentCurrency() as negative version of isSameCurrency() (#127)

Full Changelog: v3.2.4...v4.0.0

v3.2.4

27 Oct 21:14
Compare
Choose a tag to compare
Fix cast nullable column to money

v3.2.3

05 Sep 18:02
Compare
Choose a tag to compare
Adjust validation rule to accept negative amount

v3.2.2

26 Jul 08:14
Compare
Choose a tag to compare
Symbol of Brazilian Real goes first by default

v3.2.1

25 Jul 19:01
Compare
Choose a tag to compare
Fix custom list in currencies

v3.2.0

03 Jul 14:02
Compare
Choose a tag to compare

CHANGE LOG

Features

v3.1.0

17 Oct 08:22
d9dca35
Compare
Choose a tag to compare

CHANGE LOG

Features

Code fixes

  • Mock API tests (#41)

v3.0.1

14 Sep 19:29
7e0ffb3
Compare
Choose a tag to compare

CHANGE LOG

  • Removed all try-catch blocks