You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On my environment (referenced above), both of those tests are failing, with convertStripeObjectToArray returning an empty array in both cases. The second test tries to narrow down the scope of what could go wrong when the StripeObject is being created.
Upon digging a bit further into convertStripeObjectToArray, the foreach loop on line 43 of \Stripe\Util\Util does not seem to be firing in either of these tests.
The text was updated successfully, but these errors were encountered:
@CyberiaResurrection Thanks for the report. I think convertStripeObjectToArray is badly named and probably shouldn't even be public. The proper way to turn a Stripe object into an array is to call ->__toArray() on the object instance. (__toArray is also a terrible name, since it implies it's a magic method when it's not).
The \Stripe\Util\Util::convertStripeObjectToArray has been removed in stripe-php 7.0.0. You should now use the toArray() (previously __toArray()) method to convert Stripe objects to arrays.
Stripe-PHP version: v6.43.0
PHP version: 7.2.21
PHPUnit version: 8.3.4
It'd probably be easier to express what I've tripped over as executable test cases (if these help chasing it down, then please use them)
On my environment (referenced above), both of those tests are failing, with convertStripeObjectToArray returning an empty array in both cases. The second test tries to narrow down the scope of what could go wrong when the StripeObject is being created.
Upon digging a bit further into convertStripeObjectToArray, the foreach loop on line 43 of \Stripe\Util\Util does not seem to be firing in either of these tests.
The text was updated successfully, but these errors were encountered: