Skip to content

Detect queued broadcasts that escape capture #10

Description

@luisdalmolin

Problem

Queued ShouldBroadcast events handled by an asynchronous queue can leave the in-memory capture scope without producing a capture. The README documents this boundary, but an empty batch can be mistaken for a successful no-op.

Proposed direction

Detect queued BroadcastEvent jobs that escape the capture scope and provide an actionable diagnostic without rejecting synchronous ShouldBroadcastNow events or legitimate broadcastWhen() === false cases.

Acceptance criteria

  • An asynchronously queued broadcast produces a targeted diagnostic or inspectable warning.
  • Sync queue and ShouldBroadcastNow broadcasts continue to capture normally.
  • broadcastWhen() === false is not reported as an escaped queue job.
  • Event-specific queue connections and Laravel's default queue connection are covered.
  • Documentation explains how to opt into strict capture expectations.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions