Skip to content

Make SearchOrder validating more strict#341

Merged
sstok merged 1 commit into
rollersearch:mainfrom
sstok:feature/order-changes
Mar 16, 2026
Merged

Make SearchOrder validating more strict#341
sstok merged 1 commit into
rollersearch:mainfrom
sstok:feature/order-changes

Conversation

@sstok
Copy link
Copy Markdown
Contributor

@sstok sstok commented Mar 16, 2026

Q A
Bug fix? no
New feature? yes
BC breaks? yes
Deprecations? yes
Tickets
License MIT
  • Require an associative array for SearchOrder (old structure still allowed)
  • More strict validation of correct structure
  • Soft deprecate getValuesGroup() in favor of getting fields (will be finally resolved in v3.0)

@sstok
Copy link
Copy Markdown
Contributor Author

sstok commented Mar 16, 2026

sebastianbergmann/phpunit#5403 This is "interesting"...

And of course I can't reproduce this locally!! 🎉

@sstok
Copy link
Copy Markdown
Contributor Author

sstok commented Mar 16, 2026

Ah figured it out. The SearchConditionSerializer sets a custom error-handler that is removed in finally, but before this the condition is already returned and handler is still the custom one.

@sstok sstok force-pushed the feature/order-changes branch from 3585b8e to d51bf58 Compare March 16, 2026 19:44
@sstok
Copy link
Copy Markdown
Contributor Author

sstok commented Mar 16, 2026

Well that wasn't the problem then... as removing the custom error handler still makes things fail.

@sstok sstok force-pushed the feature/order-changes branch 3 times, most recently from 3009545 to 49279e8 Compare March 16, 2026 20:23
- Require an associative array for `SearchOrder` (*old* structure still allowed)
- More strict validation of correct structure
- Soft deprecate `getValuesGroup()` in favor of getting fields (will be finally resolved in v3.0)
@sstok sstok force-pushed the feature/order-changes branch from 49279e8 to e8a5414 Compare March 16, 2026 20:38
@sstok sstok merged commit ee15adc into rollersearch:main Mar 16, 2026
6 checks passed
@sstok sstok deleted the feature/order-changes branch March 16, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant