lucek/form-handler-bundle
Lucek FormHandlerBundle is a Symfony bundle that moves form handling logic out of controllers. It centralizes submission processing, validation, and response flow with a reusable handler-based approach, reducing boilerplate and making forms easier to test and maintain across your application.
bootstrap/providers.php (Laravel 11+) or config/app.php.php artisan vendor:publish --tag=package-config
event.dispatcher to event_dispatcher, so confirm you are on >=1.0.6 before debugging missing event dispatch or container-resolution errors.use Illuminate\Support\Facades\Event;
Event::listen(PackageEvent::class, fn ($event) => /* handle */);
event(new PackageEvent(...));
event_dispatcher; your application code should depend on Laravel’s event dispatcher contract (Illuminate\Contracts\Events\Dispatcher) or the events binding, not on the package’s internal argument key.EventServiceProvider or via Event::listen() in a service provider’s boot() method. Keep package-event listeners separate from domain listeners so they are easy to find with php artisan event:list.Event::fake([PackageEvent::class]) and Event::assertDispatched(...). If you need to isolate the package service, bind a mock to Illuminate\Contracts\Events\Dispatcher; do not bind a fake to event.dispatcher, which was the typo corrected in v1.0.6.extend() or a decorator rather than editing vendor service definitions. If you must override the definition, keep argument names aligned with the installed package version.afterCommit() on listeners that must not run before a transaction commits.<=1.0.5: earlier versions used the incorrect event.dispatcher argument. If you added a workaround container alias or binding for event.dispatcher, remove it after upgrading. Keeping both can mask configuration mistakes.event_dispatcher is an internal service-definition key, not a stable public container binding. Application code should resolve events or the dispatcher contract instead. This reduces the chance of breaking when the package changes its internal wiring again.php artisan optimize:clear
If you use config caching or Octane, restart workers as well. Cached service definitions can make a fixed package still behave like the old version.app()->bound('events'); // expected true
app()->bound('event_dispatcher'); // may be false; do not rely on it
Event::fake() is still active in the current test case.extend(), service decoration, and custom listeners. Avoid subclassing internal package services unless the package documents them as extension points.event_dispatcher argument name and add an integration test that dispatches a package event. This catches typo-level regressions before deployment.How can I help you explore Laravel packages today?