Closed daniser closed 2 years ago
This will not be merged before the arrival of PHP 8.1, and not before PHP 8.1 has been added to the CI environment (Github Actions).
Just FYI, not that I want to force mine or anything, but it's better to look into https://github.com/moneyphp/money/pull/670 to add the return types themselves since the classes are final any way. I'm also following up with third party dependencies that still need PHP 8.1 support.
I'll close this in favor of the PR by @driesvints that addresses more 8.1 issues, and has another fix for the serialization problem.
This library fails to work in PHP 8.1 environment because signatures of internal methods has changed (see https://wiki.php.net/rfc/internal_method_return_types).
This PR adds #[ReturnTypeWillChange] attribute to jsonSerialize() methods to suppress deprecation warning on PHP 8.1.