Closed k0ality closed 10 months ago
👋 @k0ality thanks for reaching out. You're correct that we only have limitations on the lowest available version that the library is built to support. This is so that we can add support for newer versions without breaking integrations for users still on older versions.
We addressed some issues with PHP 8.1 in a previous version, and we also run internal CI tests in PHP 8.0-8.2 but we have not received any recent errors indicating a breaking change similar to the comments in your code sample above.
Can you clarify how these errors are surfacing for you so that we can improve how we identify issues like this and ultimately resolve the issue you're encountering?
Hi!
Faced same issue on serializing error object to array via toArray method:
array_map(): Argument #2 ($array) must be of type array, null given
As far as I see, this issue actual for all inheritors of Braintree/Base.
Hey @Neolodor! I think the issue you're seeing is #336 and that may ultimately be the root of this issue, too. Since @k0ality didn't provide any additional details I'm going to close this issue, we can always reopen it if we get more info.
General information
Issue description
The package doesn't have a PHP version range locked, only the lower limit (currently composer requires "php": ">=7.3.0"), which is misleading, considering that a major update for SDK (6.0.0) was released on Apr 6, 2021 and PHP 8.0 was already around since 26 Nov 2020. However, the SDK still lacks proper support for PHP 8.0, not to mention 8.1 and 8.2.
Just one of the examples that proves my point:
Dispute object is just an example, the error will haunt any class that extends Instance, of course.
https://www.php.net/manual/en/migration80.incompatible.php