Bump DataTable from 2.3.3 to 2.3.4, TinyMCE 8.0.2 to 8.2.0, Stripe-PHP 17.6.0 to 18.1.0, PHPMailer from 6.10.0 to 7.0.0, chartjs from 4.5.0 to 4.5.1

This commit is contained in:
johnnyq
2025-11-02 16:44:59 -05:00
parent 7ea39eb545
commit f733a27ad7
170 changed files with 2280 additions and 885 deletions

View File

@@ -1,12 +1,12 @@
<?php
namespace Stripe\V2;
namespace Stripe\V2\Core;
/**
* Base class for V2 events.
*
* This is concrete for use in our generated tests. Events returned from the \Stripe\V2\Core\EventService
* will be a subtype of \Stripe\V2\Event.
* will be a subtype of \Stripe\V2\Core\Event.
*
* @property string $id Unique identifier for the event.
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.

View File

@@ -2,7 +2,7 @@
// File generated from our OpenAPI spec
namespace Stripe\V2;
namespace Stripe\V2\Core;
/**
* Set up an event destination to receive events from Stripe across multiple destination types, including <a href="https://docs.stripe.com/webhooks">webhook endpoints</a> and <a href="https://docs.stripe.com/event-destinations/eventbridge">Amazon EventBridge</a>. Event destinations support receiving <a href="https://docs.stripe.com/api/v2/events">thin events</a> and <a href="https://docs.stripe.com/api/events">snapshot events</a>.
@@ -20,10 +20,10 @@ namespace Stripe\V2;
* @property string $name Event destination name.
* @property null|string $snapshot_api_version If using the snapshot event payload, the API version events are rendered as.
* @property string $status Status. It can be set to either enabled or disabled.
* @property null|(object{disabled: null|(object{reason: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $status_details Additional information about event destination status.
* @property null|(object{disabled?: (object{reason: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $status_details Additional information about event destination status.
* @property string $type Event destination type.
* @property int $updated Time at which the object was last updated.
* @property null|(object{signing_secret: null|string, url: null|string}&\Stripe\StripeObject) $webhook_endpoint Webhook endpoint configuration.
* @property null|(object{signing_secret?: string, url?: string}&\Stripe\StripeObject) $webhook_endpoint Webhook endpoint configuration.
*/
class EventDestination extends \Stripe\ApiResource
{

View File

@@ -0,0 +1,131 @@
<?php
namespace Stripe\V2\Core;
use Stripe\Events\UnknownEventNotification;
use Stripe\Reason;
use Stripe\RelatedObject;
use Stripe\Util\EventNotificationTypes;
/**
* EventNotification represents the json that's delivered from an Event Destination.
* It's a basic class with no additional methods or properties. Use it to check basic information about a delivered event.
* If you want more details, use `$stripeClient->v2->core->events->retrieve(thin_event.id)` to fetch the full event object.
*
* @property string $id Unique identifier for the event.
* @property string $type The type of the event.
* @property string $created Time at which the object was created.
* @property null|\Stripe\StripeContext $context Authentication context needed to fetch the event or related object.
* @property null|Reason $reason Reason for the event.
* @property bool $livemode Livemode indicates if the event is from a production(true) or test(false) account.
*/
abstract class EventNotification
{
public $id;
public $type;
public $created;
public $context;
public $reason;
public $livemode;
protected $client;
// only available on children
protected $related_object;
/**
* @param array $json the raw json body
* @param \Stripe\StripeClient $client a StripeClient instance that this can use to make requests
*/
public function __construct($json, $client)
{
$this->client = $client;
if (\array_key_exists('id', $json)) {
$this->id = $json['id'];
}
if (\array_key_exists('type', $json)) {
$this->type = $json['type'];
}
if (\array_key_exists('created', $json)) {
$this->created = $json['created'];
}
if (\array_key_exists('context', $json) && null !== $json['context']) {
$this->context = \Stripe\StripeContext::parse($json['context']);
}
if (\array_key_exists('livemode', $json)) {
$this->livemode = $json['livemode'];
}
if (\array_key_exists('related_object', $json)) {
$this->related_object = new RelatedObject($json['related_object']);
}
if (\array_key_exists('reason', $json)) {
$this->reason = new Reason($json['reason']);
}
}
/**
* Helper for constructing an Event Notification. Doesn't perform signature validation, so you
* should use \Stripe\BaseStripeClient#parseEventNotification instead for
* initial handling. This is useful in unit tests and working with EventNotifications that you've
* already validated the authenticity of.
*
* @param string $jsonStr the raw json payload
* @param \Stripe\StripeClient $client a StripeClient instance that this can use to make requests
*
* @return EventNotification
*/
public static function fromJson($jsonStr, $client)
{
$json = json_decode($jsonStr, true);
$class = UnknownEventNotification::class;
$eventNotificationTypes = EventNotificationTypes::v2EventMapping;
if (\array_key_exists($json['type'], $eventNotificationTypes)) {
$class = $eventNotificationTypes[$json['type']];
}
return new $class($json, $client);
}
/**
* Retrieve the full Event from the Stripe API.
*
* @return Event
*/
public function fetchEvent()
{
$response = $this->client->rawRequest(
'get',
"/v2/core/events/{$this->id}",
null,
['stripe_context' => $this->context],
null,
['fetch_event']
);
return $this->client->deserialize($response->body, 'v2');
}
protected function fetchRelatedObject()
{
if (null === $this->related_object) {
return null;
}
$options = [];
if (null !== $this->context) {
$options['stripe_context'] = $this->context;
}
$response = $this->client->rawRequest(
'get',
$this->related_object->url,
null,
$options,
null,
['fetch_related_object']
);
return $this->client->deserialize($response->body, \Stripe\Util\Util::getApiMode($this->related_object->url));
}
}

View File

@@ -0,0 +1,14 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\V2;
/**
* @property string $id The ID of the object that's being deleted.
* @property null|string $object String representing the type of the object that has been deleted. Objects of the same type share the same value of the object field.
*/
class DeletedObject extends \Stripe\ApiResource
{
const OBJECT_NAME = '';
}