-
-
Notifications
You must be signed in to change notification settings - Fork 959
feat: support relations on filters #7711
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
base: main
Are you sure you want to change the base?
feat: support relations on filters #7711
Conversation
Maxcastel
commented
Jan 28, 2026
| Q | A |
|---|---|
| Branch? | main |
| Tickets | Closes #..., closes #... |
| License | MIT |
| Doc PR | api-platform/docs#... |
056fa57 to
fffaa15
Compare
| ); | ||
| } | ||
| $alias = $currentAlias; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you move this to a trait? we're using this everywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do a refactor commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in 5798e25
|
|
||
| foreach ($propertyNames as $property) { | ||
| $converted = $this->nameConverter?->denormalize($property) ?? $property; | ||
| if (str_contains($property, '.')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't happen right? if you've transformed all the . properties I think we should remove line 213-215 unless I'm missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on a real project, and it doesn’t work when I remove lines 213–215.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exemple for: search[products.name]
If I remove lines 213–215, products.name becomes products_Name after denormalization ($converted = $this->nameConverter?->denormalize($property)).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All tests pass after removing lines 213-215, so maybe there’s a missing test that covers this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a test in 910977d
This reverts commit 1b5a00e.
2a6baed to
490a9af
Compare