Skip to content

2.6.3 Eloa Enum no longer works with SearchFilter #4135

Closed
@crbanman

Description

@crbanman

API Platform version(s) affected: 2.6.3

Description
As of 2.6.3, using enums from elao/enum (v1.14.0) with the search filter no longer works and throws a 500 error.

(I did notice that this was never officially supported. So maybe a custom filter is in order.)

How to reproduce
Have an entity that contains an eloa/enum field and add a search filter for it.

/**
 * ...
 * @ApiFilter(SearchFilter::class, properties={"enumField": "exact"})
 */
class MyEntity {
    // ...

    /**
     * @ORM\Column(type="custom_type_enum")
     */
    public $enumField;

    // ...
}

A query against the entity collection using the filter throws a 500 error.

Possible Solution
If there's a new bug was not introduced, a custom filter may need to be created (possibly out of scope for core).

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