Skip to content

feat(doctrine): add EndSearchFilter primary for ORM and ODM#8319

Merged
soyuka merged 1 commit into
api-platform:mainfrom
soyuka:feat/end-search-filter
Jun 17, 2026
Merged

feat(doctrine): add EndSearchFilter primary for ORM and ODM#8319
soyuka merged 1 commit into
api-platform:mainfrom
soyuka:feat/end-search-filter

Conversation

@soyuka

@soyuka soyuka commented Jun 17, 2026

Copy link
Copy Markdown
Member

Summary

Adds a new canonical EndSearchFilter primary for Doctrine ORM and ODM — a suffix match ("ends with"). ORM emits LIKE '%value' (leading wildcard only); ODM emits an end-anchored regex value$. Mirrors the existing Laravel EndSearchFilter and the sibling PartialSearchFilter (same caseSensitive ctor, nested-property handling, iterable-values OR branch, OpenAPI wiring).

Purely additive — a brand-new class, no existing symbol touched, no deprecation, no BC break.

Roadmap

Part of the 4.4 preparation (canonical filter set). Spec: TODO-filters.md §5.1, §8.
Phase: 4.4 (additive only).

Test plan

  • Functional test (tests/Functional/Parameters/EndSearchFilterTest.php) proves ends-with semantics over real DQL→SQLite: ?nameEnd=rud → 0 results (not a suffix of "Gertrude"), ?nameEnd=rude → 1.
  • ODM component unit test mirrors the existing PartialSearchFilterTest (end-anchored regex).
  • Targeted suites green: tests/Functional/Parameters 387/387, tests/Functional/GraphQl 155/155, ODM unit 3/3.
  • phpstan + php-cs-fixer clean. No deprecation baseline change (additive).

New canonical suffix-match filter (LIKE %value for ORM, regex value$ for ODM),
mirrors Laravel EndSearchFilter. Additive, no BC break.

Refs TODO-filters.md §5.1, §8.
@soyuka soyuka merged commit b0f6dbd into api-platform:main Jun 17, 2026
86 of 96 checks passed
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