Skip to content

Creating custom filters without constuctor throw an error #3049

Description

@dunglas

It's not possible to create a filter without a constructor with and a array $properties parameters, because of how we wire the class passed as parameter of @ApiFilter, we should handle this case, and allow to create custom filters without constructor.

Also when using the default Dependency Injection configuration of Symfony 4, classes passed as parameters of @ApiFilter are registered two times, one time by Symfony's autowiring, one time by our compiler pass. If there are no constructors, it's useless and we should prevent this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions