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

@@ -0,0 +1,21 @@
<?php
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\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.
* @property int $created Time at which the object was created.
* @property \Stripe\StripeObject $reason Reason for the event.
* @property string $type The type of the event.
* @property null|string $context The Stripe account of the event
*/
class Event extends \Stripe\ApiResource
{
const OBJECT_NAME = 'v2.core.event';
}

View File

@@ -0,0 +1,40 @@
<?php
// File generated from our OpenAPI spec
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>.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.
* @property null|(object{aws_account_id: string, aws_event_source_arn: string, aws_event_source_status: string}&\Stripe\StripeObject) $amazon_eventbridge Amazon EventBridge configuration.
* @property int $created Time at which the object was created.
* @property string $description An optional description of what the event destination is used for.
* @property string[] $enabled_events The list of events to enable for this endpoint.
* @property string $event_payload Payload type of events being subscribed to.
* @property null|string[] $events_from Where events should be routed from.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property null|\Stripe\StripeObject $metadata Metadata.
* @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?: (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?: string, url?: string}&\Stripe\StripeObject) $webhook_endpoint Webhook endpoint configuration.
*/
class EventDestination extends \Stripe\ApiResource
{
const OBJECT_NAME = 'v2.core.event_destination';
const EVENT_PAYLOAD_SNAPSHOT = 'snapshot';
const EVENT_PAYLOAD_THIN = 'thin';
const STATUS_DISABLED = 'disabled';
const STATUS_ENABLED = 'enabled';
const TYPE_AMAZON_EVENTBRIDGE = 'amazon_eventbridge';
const TYPE_WEBHOOK_ENDPOINT = 'webhook_endpoint';
}

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));
}
}