event-engine/php-data
Immutable PHP value objects and data containers for event-driven apps. Provides typed properties, casting, validation, and convenient hydration from arrays/JSON, plus serialization back to payloads—useful for messages, commands, events, and read models in Event Engine setups.
json_encode($event->toArray())) with a batteries-included solution, avoiding reinvention while supporting Laravel’s ecosystem (e.g., Illuminate\Broadcasting).JsonSerializable or Arrayable interfaces.spatie/laravel-json-validator).To Executives:
"This update adds native JSON serialization to our event objects, letting us standardize how events are exchanged across services, APIs, and databases—without sacrificing type safety. For example, a PaymentProcessed event can now be stored in PostgreSQL and sent to Kafka with zero manual conversion. It’s a 20% productivity boost for event-heavy features like our new real-time dashboard, while reducing bugs from malformed payloads."
To Engineering:
*"v2.1.0 adds JsonSerializable support, so events like OrderShipped can now be used directly in:
$payload = json_encode($event); // No ->toArray() needed!
This works out of the box with Laravel’s Broadcast channels, API responses, and even raw JSON storage. Under the hood, it’s still immutable and validated—just more flexible. If you’re already using the package, this is a drop-in upgrade; if not, it’s another reason to adopt it for JSON-heavy workflows."*
How can I help you explore Laravel packages today?