Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle array states and values in assertTableColumnStateSet #12032

Merged
merged 2 commits into from Mar 26, 2024

Conversation

cheesegrits
Copy link
Contributor

Description

Allows assertTableColumnStateSet() (and NotSet) to be used for testing columns with array states, such as when rendering a dotted relation with multiple values.

No backward compat issues, doesn't affect any existing usage of these methods, only has any effect if the column state or the expected value are arrays.

Prior to this PR, attempting to test an array value against an array state would error out, because the code assumed $value was stringable when composing the failure message (so "array to string conversion" error). By serializing the state and/or value, this avoids that error, and also avoids potential array comparison issues (by comparing the serialized versions).

Visual changes

No visual changes

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@danharrin danharrin added the bug Something isn't working label Mar 26, 2024
@danharrin danharrin added this to the v3 milestone Mar 26, 2024
@danharrin danharrin merged commit 89ab581 into filamentphp:3.x Mar 26, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants