cloudevents/sdk-php
CloudEvents PHP SDK (v1.0) for creating mutable/immutable events, JSON serialize/deserialize, and HTTP marshal/unmarshal in structured, binary, and batch formats. Install via Composer and integrate CloudEvents into your PHP apps.
readonly properties, improving thread safety in distributed systems.str_contains deprecation, stricter type system).Throwable and new error modes (e.g., E_USER_DEPRECATED) may require updates to Laravel’s error logging (e.g., Sentry, Monolog).readonly properties) be leveraged in event schemas or custom event classes?array<string, mixed> vs. array)?Throwable::getTraceAsString()) enhance Laravel’s event tracing (e.g., X-Ray, OpenTelemetry)?array functions).str_contains) may trigger warnings in Laravel’s core or third-party packages.curl handling (e.g., HTTP/2) may benefit webhook consumers.assert functions (e.g., assert.is_int()) to validate event payloads in Laravel’s unit tests.pestphp/pest or phpunit/phpunit with PHP 8.4).composer require php:^8.4 --dev
composer update and test for deprecation warnings using:
php artisan test --env=testing --verbose
composer require cloudevents/sdk-php:^1.2.0
config/app.php to reflect PHP 8.4’s new error reporting constants (e.g., E_USER_DEPRECATED).// app/Events/CloudEvent.php
class CloudEvent implements ShouldQueue {
public function __construct(
public readonly string $eventType,
public readonly array $data,
) {}
}
enum EventType {
case ORDER_CREATED;
case PAYMENT_PROCESSED;
}
curl options (e.g., CURLOPT_HTTP_VERSION_2) for webhook consumers.finally clauses in exceptions (e.g., try-catch-finally blocks).ShouldQueue events can now use readonly properties for thread-safe payloads.laravel/framework:^10.0).composer.json constraintsHow can I help you explore Laravel packages today?