Skip to content

test: add make:event broadcast test cases (framework#1532) - #140

Merged
hwbrzzl merged 1 commit into
masterfrom
bowen/make-event-broadcast
Aug 5, 2026
Merged

test: add make:event broadcast test cases (framework#1532)#140
hwbrzzl merged 1 commit into
masterfrom
bowen/make-event-broadcast

Conversation

@goravel-coder

Copy link
Copy Markdown
Contributor

Summary

  • make:event --broadcast now scaffolds a broadcasting event (implementing BroadcastOn, BroadcastAs, BroadcastWith, and BroadcastWhen), and --broadcast --now additionally scaffolds BroadcastNow returning true; both are covered by new feature tests.
  • Broadcast event channels are declared as plain []string instead of the removed contracts.Channel struct.
  • Framework bumped to the v1.18.1-0.20260805080351-d2e95f66f306 pseudo-version containing framework#1532 (make:event broadcast/now flags and the broadcasting channel refactor).

Why

Framework PR goravel/framework#1532 adds --broadcast and --broadcast --now flags to the make:event command and replaces the broadcasting.Channel struct with plain []string channels. The example repository must stay in sync with that API so the generated events compile and demonstrate the new scaffolding.

The example's broadcast events now return []string channels, and the event feature suite gains coverage for both new command flags, verifying the scaffolded file contents (broadcast methods present, listener-only methods absent, and BroadcastNow returning true only for the --now variant).

type OrderShippedBroadcast struct {
	OrderData   map[string]any
	ChannelName string
}

func (e *OrderShippedBroadcast) BroadcastOn() []string {
	return []string{
		broadcasting.PublicChannel(e.ChannelName),
	}
}

@goravel-coder
goravel-coder requested a review from a team as a code owner August 5, 2026 08:50
@hwbrzzl
hwbrzzl merged commit c1099ba into master Aug 5, 2026
9 checks passed
@hwbrzzl
hwbrzzl deleted the bowen/make-event-broadcast branch August 5, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants