Repository navigation
Keep pin test throwing on newer Livewire - #575
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SupportTicketTest::only_internal_notes_can_be_pinnedpasses 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
ModelNotFoundExceptionto 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'sexpectExceptionnever 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