Fix default color and icon for state in CustomerGroupRelationManager#2330
Merged
glennjacobs merged 5 commits intolunarphp:1.xfrom Nov 11, 2025
Merged
Fix default color and icon for state in CustomerGroupRelationManager#2330glennjacobs merged 5 commits intolunarphp:1.xfrom
glennjacobs merged 5 commits intolunarphp:1.xfrom
Conversation
Add support for when postgres casts booleans to php bool, thereby casting to an empty string for the match case
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds default cases to two match expressions in the CustomerGroupRelationManager to handle unexpected state values. The changes ensure that when the state doesn't match '0' or '1', the code gracefully defaults to showing a warning color and x-circle icon instead of potentially throwing an error.
- Added default case handling for color and icon match expressions
- Ensures graceful degradation for unexpected state values
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wychoong
reviewed
Nov 4, 2025
...min/src/Filament/Resources/ProductResource/RelationManagers/CustomerGroupRelationManager.php
Outdated
Show resolved
Hide resolved
if it has to be loose equality anyway, might as well save the space
glennjacobs
approved these changes
Nov 11, 2025
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.
Add support for when postgres casts booleans to php bool, thereby casting
falseto an empty string for the match casePlease describe your Pull Request as best as possible, explaining what it provides and why it is of value, referencing any related Issues.
Try to include the following in your Pull Request, where applicable...