api-platform / core

The server component of API Platform: hypermedia and GraphQL APIs in minutes
https://api-platform.com
MIT License
2.38k stars 846 forks source link

Add a way to configure default strategy mode for the SearchFilter #6398

Open Simperfit opened 1 month ago

Simperfit commented 1 month ago

Description

As of today, in order to not have the by default exact strategy for the search filter, we have to add a custom filter to change the strategy. This occurs if we want to enables all properties on the filter.

Example

Could we use an option in order to remove the on default behaviour and be able to pass a default behaviour that suit the application.

https://github.com/api-platform/core/blob/9c3faed721f357e2bb6e9bc65d155444b450e5b3/src/Doctrine/Orm/Filter/SearchFilter.php#L190