Split DB Updates into seperate files, with the cutoff being 2.0.0

This commit is contained in:
johnnyq
2026-07-22 18:43:11 -04:00
parent 17e4c61067
commit 2b756f6ea4
252 changed files with 4161 additions and 4875 deletions

View File

@@ -32,11 +32,17 @@ abstract class Webhook
$jsonError = \json_last_error();
if (null === $data && \JSON_ERROR_NONE !== $jsonError) {
$msg = "Invalid payload: {$payload} "
. "(json_last_error() was {$jsonError})";
. "(json_last_error() was {$jsonError})";
throw new Exception\UnexpectedValueException($msg);
}
if (isset($data['object']) && 'v2.core.event' === $data['object']) {
throw new Exception\UnexpectedValueException(
'You passed an event notification to Webhook::constructEvent, which expects a webhook payload. Use StripeClient::parseEventNotification instead.'
);
}
return Event::constructFrom($data);
}
}