Closed cristiancalara closed 2 years ago
Use Money v4.
Use Money v4.
I'd love to (and I use it sometimes). But there are some situations where you just cannot use v4, mainly when you have a server with PHP 8 without bcmath extension. In such a case, even composer, by requiring this library without constraints, makes you install v3.
I perfectly understand the decision of not supporting an old branch, but could you please make an exception for this edge case? After all, it's just about merging the related PR and releasing a patch version.
Done, also tagged a new 3.x version.
If I'm not mistaken this is still an issue in v4 on PHP 8.2. https://github.com/silverstripe/silverstripe-omnipay/actions/runs/8611734928/job/23599504795?pr=247
You are installing lowest dependencies there, right? That results in MoneyPHP 3.1.0 being installed. See also composer.json of omnipay/common.
You need at least MoneyPHP 3.3.2 for PHP 8.2.
Actually, I cannot believe this is still an issue. MoneyPHP v3.1.0 is from 2018. This is a waste of my, and anybody else's time.
@frederikbosch My sincere apologies if this is a waste of time. As far as I can see from that failed run 4.5.0 is installed and being used with PHP 8.2 and still failing hence my enquiry.
Where is that screenshot from? In the link you included in the original message, where I relinked to in my reply, you see that MoneyPHP 3.1.0 is being installed, not version 4.
PHP Deprecated: Return type of Money\Money::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Money.php on line 521
Found this thread on a different package that might help https://github.com/ramsey/uuid/issues/381#issuecomment-1035461859
I think that to avoid a breaking change - we can just add the
#[ReturnTypeWillChange]
attribute to the method?