Skip to content

[Rest] NumericFilter and RangeFilter on the same property triggers an error #3634

@jdeniau

Description

@jdeniau

API Platform version(s) affected: 2.*

Description

Creating both NumericFilter and RangeFilter on the same key triggers the following notice :

At least one value is required, multiple values should be in "schemaVersion[]=firstvalue&schemaVersion[]=secondvalue" format

This issue is similar to #3483 but for REST and the error is not as blocking.

Possible Solution

I would go for the same possible solution as @epourail : implementing [eq] and [neq] for the range filter, this way, the NumericFilter could be only used for "simple" search, and the RangeFilter superseed the NumericFilter for complex searches.

I can open a PR on that if you want to, and it may fix #3483 too.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions