KernelTestCase, debug:event-dispatcher), making it a natural fit for Symfony-based applications but non-applicable for Laravel without significant abstraction.debug:event-dispatcher equivalent). The bundle’s reliance on Symfony’s EventDispatcher internals (e.g., event_dispatcher.xml dumping) is incompatible without a Laravel-specific adapter.EventDispatcherTesterTrait) cannot be ported to Laravel without rewriting core logic (e.g., event listener introspection).EventListenerValidator trait) but would require:
debug:event-dispatcher logic for Laravel’s EventDispatcher.spatie/laravel-test-factories, orchestra/testbench) that already solve similar problems?Artisan::call() + service container inspection achieve the same goals without external dependencies?Draw\Bundle\TesterBundle actively maintained? If not, would forking and Laravel-izing it be sustainable?KernelTestCase, EventDispatcher internals) make it non-portable to Laravel without a rewrite.Events facade and EventServiceProvider could be inspected via reflection or app()->make() calls, but no direct equivalent to Symfony’s debug:event-dispatcher.ServiceProvider bootstrapping differs from Symfony’s kernel; validation would require custom logic (e.g., checking app()->has() or app()->bound()).| Step | Action | Laravel Equivalent/Adapter Needed |
|---|---|---|
| 1 | Install Symfony Bundle | Not applicable (would require Composer conflict resolution). |
| 2 | Use EventDispatcherTesterTrait |
Rewrite as a custom trait using Laravel’s EventDispatcher reflection. |
| 3 | Validate event_dispatcher.xml |
Replace with JSON/YAML fixture or in-memory assertion (e.g., assertEquals($expectedListeners, $this->getEventListeners())). |
| 4 | Kernel Testing | Use Laravel’s RefreshDatabase/MigrateFresh traits or custom ServiceContainerTestCase. |
| 5 | CI Integration | Adapt test commands to Laravel’s php artisan test or PestPHP. |
ContainerInterface ≠ Laravel’s Container. The bundle’s service validation would need to map Symfony’s debug:container logic to Laravel’s app()->services or app()->bindings.EventListenerTester trait using Laravel’s EventDispatcher reflection:
trait EventListenerTesterTrait {
protected function getEventListeners(): array {
return collect(app('events')->getListeners())
->mapWithKeys(fn ($listeners, $event) => [$event => $listeners])
->toArray();
}
}
assertArrayHasKey('event.name', $listeners)).EventDispatcher in Laravel 11+).laravel-shift/testing) offer better support.| Scenario | Impact | Mitigation |
|---|---|---|
| Symfony Bundle Abandoned | Laravel integration |
How can I help you explore Laravel packages today?