Skip to content

Make DefaultFilterForm robust for untyped and non-Doctrine properties #34

Description

@javihgil

Problem

DefaultFilterForm currently builds filter fields and sortable fields from raw reflection properties.

Current behavior

  • order_valid_fields is built from all reflected properties of the entity class.
  • getFilterFields() iterates all reflected properties as potential filters.
  • String detection calls ReflectionProperty::getType()->getName() without guarding null.

Why it matters

This can break or behave incorrectly when an entity has:

  • untyped properties
  • transient or internal properties that are not Doctrine fields
  • properties that should not be exposed as sortable or filterable fields

Suggested direction

Base the default filter and default sortable fields on Doctrine metadata or add stronger guards so the generated defaults only include safe, supported fields.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions