Skip to content

feat(doctrine): new search filters #7121

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

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

vinceAmstoutz
Copy link
Member

@vinceAmstoutz vinceAmstoutz commented May 5, 2025

Q A
Branch? main
License MIT
Doc PR TBD

The aim of this PR is to have the API Platform search filters like API Platform eloquent filters.

This PR continues the improvements initiated in pull requests #7079 and #6865, aiming to finalize the efforts started initially in pull request #6775.

TODO (by order of priority) :

  • IriFiter ORM (made by @soyuka)
  • ExactFilter ORM
  • PartialSearchFilter ORM
  • Refactoring filter fixtures
  • IriFilter ODM
  • ExactFilter ODM
  • PartialSearchFilter ODM
  • OrFilter ORM
  • OrFilter ODM
  • Check OpenApi documentation
  • Fix ODM filters on relations

@vinceAmstoutz vinceAmstoutz force-pushed the feat/new-doctrine-iri-search-filters branch from 0271e3e to 774ba0c Compare May 5, 2025 03:17
@vinceAmstoutz vinceAmstoutz marked this pull request as draft May 5, 2025 03:18
@vinceAmstoutz vinceAmstoutz force-pushed the feat/new-doctrine-iri-search-filters branch 4 times, most recently from 8322356 to 773ce67 Compare May 5, 2025 04:54
@soyuka soyuka mentioned this pull request Jun 4, 2025
@vinceAmstoutz vinceAmstoutz force-pushed the feat/new-doctrine-iri-search-filters branch 4 times, most recently from ae2ad0e to 662ad04 Compare June 12, 2025 13:50
@vinceAmstoutz vinceAmstoutz force-pushed the feat/new-doctrine-iri-search-filters branch from 662ad04 to f6bbe8b Compare July 2, 2025 08:58
@vinceAmstoutz vinceAmstoutz marked this pull request as ready for review July 4, 2025 07:56
return new OpenApiParameter(name: $parameter->getKey().'[]', in: 'query', style: 'deepObject', explode: true);
}

public function getDescription(string $resourceClass): array
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this method to a trait inside Metadata, also add * @deprecated in 4.2, to be removed in 5.0 to the Metadata\FilterInterface (we'll handle the bc later)

* @throws ServerExceptionInterface
*/
#[DataProvider('filterDataProvider')]
public function testOrFilter(string $url, int $expectedCount, array $expectedNames): void
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this correctly tests an Or filter

@vinceAmstoutz vinceAmstoutz force-pushed the feat/new-doctrine-iri-search-filters branch from c7b4646 to caf1ac7 Compare August 20, 2025 14:33
@vinceAmstoutz vinceAmstoutz changed the title feat(doctrine): new iri search filters feat(doctrine): new search filters Aug 20, 2025
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.

3 participants