Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Event Source

Event Source Laravel Package

garlic/event-source

garlic/event-source is a Laravel/PHP event sourcing package for persisting domain changes as immutable events, rebuilding aggregates, and projecting read models. It helps teams add auditability and decoupled workflows to their applications.

View on GitHub
Deep Wiki
Context7

Garlic Event Source is a lightweight event-sourcing toolkit for Laravel that models domain state as an append-only stream of domain events. Persist aggregates, replay their history, and build read models without coupling business logic to storage details.

  • Aggregate roots with event recording and replay
  • Event store persistence with configurable drivers
  • Projectors and reactors for read models and side effects
  • Snapshots to speed up rehydration of long streams
  • Laravel-native config, service provider, and Artisan generators
Frequently asked questions about Event Source
What is garlic/event-source used for?
The Composer package garlic/event-source points to the Hoa\Eventsource library and is packaged as a Symfony bundle for server-sent events (SSE), not an event-sourcing framework. Its practical purpose is streaming text/event-stream responses from a Symfony-era PHP application. The accompanying event-sourcing blurb is misleading for Laravel teams. Treat it as an SSE integration, not a domain event store.
Is garlic/event-source a Laravel package?
No. There is no evidence of a Laravel service provider, facade, config stub, or composer.json extra.laravel.providers entry. Laravel does not consume Symfony bundles directly, so you would be integrating the framework glue yourself. For a Laravel app, this is at best vendored source under app/Support, not a drop-in dependency.
Can I install garlic/event-source with Composer in Laravel 10, 11, or 12?
Likely not. The 2017 release predates modern Laravel and pins Symfony 2.8/3.x-era constraints, while Laravel 10-12 require symfony/* 6.x/7.x. Composer will usually fail on transitive constraints before loading any code. Test in a throwaway project before planning around it.
Does garlic/event-source support PHP 8.1 through 8.4?
Unverified. The package was written for PHP 5.6/7.0 and has had no releases for over eight years, so PHP 8.x deprecations and untyped internals are a real risk. Run the code under PHP 8.3 with deprecations enabled during any spike. If it emits notices, budget time to patch or vendor.
What Laravel version does garlic/event-source support?
None are documented. The release timeline and Symfony constraints place it in the Laravel 5.x era, and there is no package discovery or documented Laravel config surface. Modern Laravel versions are not supported out of the box. Do not assume Laravel 10/11/12 compatibility.
How do I configure garlic/event-source for event sourcing?
You probably cannot, because the package is an SSE bundle rather than an event-sourcing library. There is no documented aggregate, event store, replay, or projection configuration in the context provided. If you need event sourcing in Laravel, evaluate dedicated packages such as Spatie event-sourcing or build a small event store yourself. Do not rely on the blurb.
What is the difference between SSE and event sourcing?
Server-sent events are a one-way HTTP streaming protocol for pushing text/event-stream messages from server to browser. Event sourcing is a persistence pattern that stores domain events as the source of truth and rebuilds state by replaying them. garlic/event-source appears to address the former, despite a blurb describing the latter. Clarify which problem you are solving before adopting it.
Is garlic/event-source safe for production use?
High risk. The project has zero stars and zero dependents, no recent releases, no security disclosure channel, and no production signal. Its license and code lineage should be confirmed before vendoring. For production SSE, native Laravel streaming or a maintained hub is safer.
What are good alternatives to garlic/event-source for SSE in Laravel?
Use Laravel's response()->stream() or StreamedResponse with text/event-stream, Cache-Control: no-cache, X-Accel-Buffering: no, and a heartbeat comment every 15-25 seconds. Pair it with Redis pub/sub for multi-node fan-out or a database cursor poll for simple cases. Mercure, Ably, or Pusher are realistic managed alternatives if you want a maintained component.
How should I test or vendor garlic/event-source before adopting it?
Timebox a one-to-two day spike. Check whether the SSE writer is container-free, inspect composer.json PHP and symfony/* constraints, verify PHP 8.3 behavior, confirm heartbeat/retry/Last-Event-ID support, and identify the maintainer and license. If the writer is clean and permissively licensed, a vendored copy is defensible; otherwise implement SSE natively.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console