Skip to content

Commit

Permalink
Prevent subclassing AbstractMoney
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Oct 5, 2022
1 parent 0d51018 commit fadaf6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
💥 **Breaking changes**

- JSON extension is now required for PHP 7.4 (always available with PHP >= 8.0)
- `AbstractMoney` is now officially sealed, extending it yourself is not supported

**New features**

Expand Down
3 changes: 3 additions & 0 deletions src/AbstractMoney.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

/**
* Base class for Money and RationalMoney.
*
* Please consider this class sealed: extending this class yourself is not supported, and breaking changes (such as
* adding new abstract methods) can happen at any time, even in a minor version.
*/
abstract class AbstractMoney implements MoneyContainer, JsonSerializable
{
Expand Down

0 comments on commit fadaf6d

Please sign in to comment.