- Can I use php-engine with Laravel 11 for event sourcing?
- Yes, php-engine is fully compatible with Laravel 11 (PHP 8.3). It leverages Laravel’s service container and event system, making it a seamless fit for event-driven architectures. Ensure your `composer.json` enforces PHP 8.2+ to avoid compatibility issues.
- What’s the impact of dropping PHP 8.4 support in this release?
- The package now requires PHP 8.1–8.3, meaning Laravel 9 (PHP 8.1) may face minor risks if it relies on PHP 8.2+ features. Upgrade to Laravel 10/11 (PHP 8.2/8.3) for full stability. Check your CI/CD pipelines for PHP version validation.
- How do I integrate php-engine with Laravel’s queue system?
- php-engine doesn’t natively integrate with Laravel queues, but you can manually dispatch events to queues using Laravel’s `dispatch()` helper. For async event processing, pair it with Laravel’s queue workers or Redis-based event stores like `prooph/event-store`.
- Are there Laravel-specific migration guides for php-engine?
- No, the documentation lacks Laravel-specific guides. Focus on the [tutorial](https://event-engine.io/tutorial/) and adapt the Prooph Event Store examples to Laravel’s service container. Start with the [skeleton repo](https://github.com/event-engine/php-engine-skeleton) for a baseline setup.
- What Flavours does php-engine support, and how do I choose one?
- php-engine offers multiple Flavours (e.g., Command Bus, Event Store, Query Bus) to customize your architecture. Pick based on your needs: use the **Command Bus Flavour** for workflows, **Event Store Flavour** for persistence, or combine them. The [Flavour guide](https://event-engine.github.io/docs/) explains trade-offs.
- Will php-engine work with legacy Laravel apps (pre-8.0)?
- No, php-engine requires PHP 8.1+, so it’s incompatible with Laravel 7 or earlier. For legacy apps, consider refactoring to Laravel 9+ first or explore alternatives like `spatie/laravel-event-sourcing` for simpler event sourcing without CQRS.
- How do I test php-engine in a Laravel project?
- Test event listeners and aggregates under PHP 8.2/8.3 to catch silent failures. Use Laravel’s `EventServiceProvider` to mock event dispatching. For aggregate tests, leverage the [Prooph Event Store test utilities](https://github.com/prooph/event-store) with `--prefer-source` as noted in the README.
- Does php-engine support Redis for event storage?
- No, php-engine assumes external backends like SQL or Prooph’s Event Store. For Redis, pair it with Laravel’s cache or use a custom event store adapter. The [Prooph Event Store](https://github.com/prooph/event-store) supports Redis via plugins, but php-engine itself doesn’t.
- What’s the performance overhead of php-engine in Laravel?
- There’s no public benchmarking, but php-engine adds minimal overhead for event dispatching. For critical paths, profile with Laravel’s `benchmark()` helper. The package’s modular design lets you disable unused Flavours to reduce load.
- Are there alternatives to php-engine for Laravel event sourcing?
- Yes. For simpler needs, try `spatie/laravel-event-sourcing` (lightweight) or `laravel-ide-helper/event-sourcing` (IDE-friendly). For CQRS-heavy apps, `prooph/event-sourcing-bundle` (Symfony-compatible) or `cubex/laravel-cqrs` are alternatives. php-engine stands out for its Flavours and Prooph’s maturity.