Skip to content

Keep pin test throwing on newer Livewire - #575

Merged
simonhamp merged 1 commit into
mainfrom
claude/optimistic-proskuriakova-dc3ec8
Oct 23, 2026
Merged

simonhamp merged 1 commit into
mainfrom
claude/optimistic-proskuriakova-dc3ec8

Conversation

@simonhamp

Copy link
Copy Markdown
Member

SupportTicketTest::only_internal_notes_can_be_pinned passes on the locked Livewire (4.3.3) but fails on 4.4.6 and later. CI is green today because it installs from the lock. The test will break the next time someone bumps Livewire.

Livewire 4.4.6 (livewire/livewire@3a0ef9f) added ModelNotFoundException to the exceptions its test request broker passes to the app's exception handler. A missing model now comes back as a 404 response instead of being thrown, so the test's expectException never fires. Filament has nothing to do with it.

The fix is one line in the test: call $this->withoutExceptionHandling() before the Livewire call. Livewire's broker then hands the exception to Laravel's rethrowing handler, so it is thrown on both old and new versions. The widget is unchanged.

I ran the SupportTicket tests (95) on the current lock and again after composer update livewire/livewire 'filament/*' (Livewire 4.4.7, Filament 5.10.2). They all pass on both. Without the fix, the test fails on the newer versions. The lock bump is not included.

🤖 Generated with Claude Code

Livewire 4.4.6 (commit 3a0ef9f9fb) added ModelNotFoundException to the
exceptions its test request broker passes to the app's exception
handler, so a missing model now comes back as a 404 response instead of
being thrown. only_internal_notes_can_be_pinned expected the exception
and failed once Livewire was bumped past the locked 4.3.3.

Turning off exception handling in the test makes the broker's handler
fall through to Laravel's rethrowing one, so the exception surfaces on
both the locked and newer versions. Filament was not involved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simonhamp
simonhamp merged commit 1563cf7 into main Oct 23, 2026
2 of 3 checks passed
@simonhamp
simonhamp deleted the claude/optimistic-proskuriakova-dc3ec8 branch October 23, 2026 14:50
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.

1 participant