Releases: nextdeveloper-nl/events
Releases · nextdeveloper-nl/events
Release list
v1.2.26
What's Changed
- fix: cast the bigint[] listener id columns with IntegerArray by @ikhalilatteib in #24
- fix: boot models on Laravel 12+ by registering observers in booted() by @ikhalilatteib in #23
- Dev by @ikhalilatteib in #25
Full Changelog: v1.2.25...v1.2.26
v1.2.24
What's Changed
- feat: let an event listener describe who to notify and when by @ikhalilatteib in #21
- Dev by @ikhalilatteib in #22
Full Changelog: v1.2.23...v1.2.24
v1.1.9: Merge pull request #17 from nextdeveloper-nl/dev
- Replaces get_class($this->model) with \NextDeveloper\Commons\Helpers\ObjectHelper::getPublicObjectName($this->model) so object_type in the NATS payload uses the short public form (e.g. NextDeveloper\IAAS\VirtualMachines) instead of the full internal model path
feat: NATS real-time event system with auth callout, mTLS and model publishing
- Auth callout service: NatsAuthCalloutService validates every NATS connection via $SYS.REQ.USER.AUTH. Agents authenticated via events_token (compute/storage/network), browser clients via OAuth tokens. Returns NKey-signed two-layer JWTs with scoped pub/sub permissions.
- NkeyHelper: Ed25519 NKey encoding, JWT signing, and base32 utilities — no external NKey library dependency.
- Platform mTLS: NatsService and NatsAuthListenerCommand both present NATS_TLS_CERT/NATS_TLS_KEY client certificates for mTLS on port 4222.
- Auth listener: NatsAuthListenerCommand uses subscribeQueue (queue group nats-auth-callout) so multiple container instances share load without duplicate responses. Reconnects automatically on connection drop.
- Model event publishing: Events::fire() auto-dispatches NatsPublisherJob when NATS is enabled. Job resolves Fractal transformer from model class name, transforms the model, publishes to client.{account_uuid}.evt.
- Multi-account subscriptions: OAuth clients get client.{uuid}.evt for every account in iam_account_user — account switching doesn't require reconnect.
- NatsService: Connects as auth-service (bypasses callout) for platform publish access.
Checking the event if exists first
Check class_exists() before dispatching — if the callback class is not loaded in the current project, log a warning and skip instead of throwing. Also removed the unused new $job($model) instantiation (dead code) and widened the catch to \Throwable so PHP Errors are also caught.
docs: Add library listing and community links to README
Pass parameters to job dispatch method in event handling
Pass parameters to job dispatch method in event handling
Events now has parameters
Events now has parameters
Initial production release
Initial production release
Now we can fire multiple events at the same time
- Try catch added to events
- Now we can fire multiple events at the same time