Telescope Version
5.18.0
Laravel Version
12.46.0
PHP Version
8.4.18
Database Driver & Version
MySQL 8.4.2 on macOS 14.8 arm64 (Homebrew client: 8.4.8)
Description
Description
Telescope appears to be incompatible with Laravel Horizon's documented listener tagging signature for queued event listeners.
Horizon documents listener tagging like this:
https://laravel.com/docs/12.x/horizon#manually-tagging-event-listeners
Example:
use App\Events\OrderShipped;
class SendShipmentNotification implements ShouldQueue
{
public function handle(OrderShipped $event): void
{
// ...
}
public function tags(OrderShipped $event): array
{
return ['shipment'];
}
}
That works for Horizon, but when Telescope inspects a queued listener it calls tags() with no arguments and throws an argument count error.
From Laravel\Telescope\ExtractTags, Telescope ends up doing:
return method_exists($target, 'tags') ? $target->tags() : [];
So for a queued listener with public function tags(SomeEvent $event): array, Telescope crashes with:
Too few arguments to function App\Listeners\...\tags(), 0 passed in vendor/laravel/telescope/src/ExtractTags.php on line 102 and exactly 1 expected
Expected Behavior
Telescope should not fail when inspecting a queued listener that uses Horizon's documented tags() signature.
Steps To Reproduce
Steps
- Install Laravel with Horizon and Telescope enabled.
- Create a queued event listener implementing ShouldQueue.
- Add a
tags(SomeEvent $event): array method exactly as documented in the Horizon docs.
- Dispatch the event so the queued listener runs. (don't forget to run horizon)
- Let Telescope record the queue activity.
Example listener:
use App\Events\OrderShipped;
class SendShipmentNotification implements ShouldQueue
{
public function handle(OrderShipped $event): void
{
// ...
}
public function tags(OrderShipped $event): array
{
return ['shipment'];
}
}
Additional Context
This is specifically about queued listeners, not regular queued jobs.
It looks like ExtractTags::tagsForListener() inspects both:
- the listener instance created via reflection
- the queued event payload
but explicitTags() calls tags() without arguments on each target, which breaks for listener methods that expect the event.
Telescope Version
5.18.0
Laravel Version
12.46.0
PHP Version
8.4.18
Database Driver & Version
MySQL 8.4.2 on macOS 14.8 arm64 (Homebrew client: 8.4.8)
Description
Description
Telescope appears to be incompatible with Laravel Horizon's documented listener tagging signature for queued event listeners.
Horizon documents listener tagging like this:
https://laravel.com/docs/12.x/horizon#manually-tagging-event-listeners
Example:
That works for Horizon, but when Telescope inspects a queued listener it calls
tags()with no arguments and throws an argument count error.From
Laravel\Telescope\ExtractTags, Telescope ends up doing:So for a queued listener with
public function tags(SomeEvent $event): array, Telescope crashes with:Too few arguments to function App\Listeners\...\tags(), 0 passed in vendor/laravel/telescope/src/ExtractTags.php on line 102 and exactly 1 expectedExpected Behavior
Telescope should not fail when inspecting a queued listener that uses Horizon's documented
tags()signature.Steps To Reproduce
Steps
tags(SomeEvent $event): arraymethod exactly as documented in the Horizon docs.Example listener:
Additional Context
This is specifically about queued listeners, not regular queued jobs.
It looks like
ExtractTags::tagsForListener()inspects both:but
explicitTags()callstags()without arguments on each target, which breaks for listener methods that expect the event.