Closed markdavidsonEE closed 1 year ago
Thanks @markdavidsonEE .Would love to see this one merged for better PHP 8.2 compatibility.
@markdavidsonEE thank you very much for this PR. Can you please merge updates from braintree:master. I might use your fork then... Dont wanna wait for Godot...
Solid Samuel Becket reference @slepic
We'll be prioritizing this soon. We're a very small team and have a lot of responsibilities, but this is near the top of my list of things we need to address now that we've finished up some other high priority things.
Thank you so much for kickstarting this with the PR @markdavidsonEE and sorry it has taken us so long to respond.
Great stuff @crookedneighbor happy to help out.
@slepic that's now up to date with master.
This is out in v6.11.1
I didn't realize it was quite common for PHP projects to treat deprecation warnings as full-blown errors. If I had known that ahead of time, I would have prioritized getting this out sooner. Sorry for the wait!
Ran into this issue when updating to PHP 8.2 in prod yesterday. Glad its fixed. Has a release been cut with these changes and if so, which version? We are currently on 6.10.0.
Yes, we released it earlier this week in v6.11.1
Summary
These changes intend to fix a number of deprecation warnings encountered when using the library under PHP 8.2 e.g.
Creation of dynamic property Braintree\\Result\\Successful::$transaction is deprecated
Where possible the properties have simply been added to the classes. However in the case of
Instance
this was not possible and it does require the use of dynamic properties currently. So a workaround of extendingstdClass
has been used see https://php.watch/versions/8.2/dynamic-properties-deprecated#stdClass for more details.Additionally this resolves https://github.com/braintree/braintree_php/issues/324 credit to @mvoelker for initial hint on partial solution.
Checklist