- 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.