This potentially breaks other application functionality, in our case Laravel Telescope when using Octane. Telescope also listens to the Laravel\Octane\Events\RequestReceived event but the dispatcher never invokes listeners because the arrow function BladeRouteGenerator::$generated = false returns false. This makes Telescope not record any requests.
Ziggy version
2.0.3
Laravel version
10.46.0
Description
The arrow function given to the event listener at https://github.com/tighten/ziggy/blob/2.x/src/ZiggyServiceProvider.php#L20 returns boolean
false
. This makes the dispatcher stop further propagating of the event at https://github.com/laravel/framework/blob/10.x/src/Illuminate/Events/Dispatcher.php#L298 .This potentially breaks other application functionality, in our case Laravel Telescope when using Octane. Telescope also listens to the
Laravel\Octane\Events\RequestReceived
event but the dispatcher never invokes listeners because the arrow functionBladeRouteGenerator::$generated = false
returns false. This makes Telescope not record any requests.I think a fix would be to revert back to a "regular" function in the Event::listen() call in https://github.com/tighten/ziggy/blob/2.x/src/ZiggyServiceProvider.php#L20 so the function does not return
false
. If we all agree to that I'm willing to write a quick PR for that, let me know.Ziggy call and context
Ziggy configuration
Route definition