Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to protected method ApiPlatform\\Doctrine\\Orm\\Filter\\SearchFilter::splitPropertyParts() from scope ApiPlatform\\Doctrine\\Orm\\Filter\\AbstractFilter #6787

Open
germi opened this issue Nov 12, 2024 · 0 comments

Comments

@germi
Copy link

germi commented Nov 12, 2024

API Platform version(s) affected: 4.0

Description
When I try to filter by a relation, ie &relation.id=2 it throws this error. Yesterday it was working just fine, there hasn't been any changes related to this. Today it throws the error. Unexplicably. Running PHP 8.3.13

How to reproduce
This is what the ApiFilter attribute looks like

#[ApiFilter(SearchFilter::class, properties: [
    'municipality.id' => 'exact',
    'municipality.municipality_code_6' => 'exact',
    'municipality.municipality_code' => 'exact',
    'indicator.target.target_id' => 'exact',
    'indicator.indicator_id' => 'exact',
    'indicator.id' => 'exact',
    'year' => 'exact'])]

when I filter by year (simple filter) it works. but if I filter by a relation, for example municipality.id, it breaks.

Possible Solution

Additional Context
I tried on another computer, same PHP version, all the same, and it works. But in my current computer, where it was totally working yesterday, now it throws
Call to protected method ApiPlatform\\Doctrine\\Orm\\Filter\\SearchFilter::splitPropertyParts() from scope ApiPlatform\\Doctrine\\Orm\\Filter\\AbstractFilter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant