Final classes, you either love them or hate them. Developers have been discussing composition over inheritance for years, and final classes are a perfect use case.
Before final classes, we would extend the Money class and use it as I need to.
class MoneyImplementation { private Money $money; public function __construct( int|string $amount, Currency $currency, ) { $this->money = new Money( amount: $amount, currency: $currency, ); }}
The next problem is how do we call class methods on the money class without extending the API we want to call.