Bump stripe-php from 16.4.0 to 17.2.1

This commit is contained in:
johnnyq
2025-05-22 12:37:35 -04:00
parent 5361391b3b
commit 6a368840fa
332 changed files with 4978 additions and 4624 deletions

View File

@@ -133,8 +133,8 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable
{
if (static::getPermanentAttributes()->includes($k)) {
throw new Exception\InvalidArgumentException(
"Cannot set {$k} on this object. HINT: you can't set: " .
\implode(', ', static::getPermanentAttributes()->toArray())
"Cannot set {$k} on this object. HINT: you can't set: "
. \implode(', ', static::getPermanentAttributes()->toArray())
);
}
@@ -331,7 +331,7 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable
// This is necessary in case metadata is empty, as PHP arrays do
// not differentiate between lists and hashes, and we consider
// empty arrays to be lists.
if (('metadata' === $k) && (\is_array($v))) {
if (('metadata' === $k) && \is_array($v)) {
$this->_values[$k] = StripeObject::constructFrom($v, $opts, $apiMode);
} else {
$this->_values[$k] = Util\Util::convertToStripeObject($v, $opts, $apiMode);
@@ -379,7 +379,7 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable
// value that we shouldn't appear in the serialized form of the object
return \array_filter(
$updateParams,
function ($v) {
static function ($v) {
return null !== $v;
}
);
@@ -421,9 +421,9 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable
}
throw new Exception\InvalidArgumentException(
"Cannot save property `{$key}` containing an API resource of type " .
\get_class($value) . ". It doesn't appear to be persisted and is " .
'not marked as `saveWithParent`.'
"Cannot save property `{$key}` containing an API resource of type "
. \get_class($value) . ". It doesn't appear to be persisted and is "
. 'not marked as `saveWithParent`.'
);
}
if (\is_array($value)) {
@@ -470,7 +470,7 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable
*/
public function toArray()
{
$maybeToArray = function ($value) {
$maybeToArray = static function ($value) {
if (null === $value) {
return null;
}