Skip to content

Mention that the old Filter classes are still used as filters #2225

@KDederichs

Description

@KDederichs

While trying to understand the new filter system I've run into an issue where I tried to get it to filter a date time property without using the old DateFiltersince the docs kinda read like those are going away.

Turns out though you still need to use those as parameters of the QueryParameter annotation, like this:

#[QueryParameter(key: 'createdAt', filter: new DateFilter())]

The docs on that are REALLY confusing since that's mentioned nowhere (as far as I can tell).

So some more examples and a list of possible filter types would be great.
Alternatively it could also be helpful if it inferred the filter type from the parameter you're trying to filter cause in my case the DateTimeImmutable property resulted in an equal filter which is not very useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions