feat: support relations on filters#7711
Merged
soyuka merged 1 commit intoapi-platform:mainfrom Feb 13, 2026
Merged
Conversation
056fa57 to
fffaa15
Compare
Contributor
soyuka
requested changes
Feb 6, 2026
Member
There was a problem hiding this comment.
could you move this to a trait? we're using this everywhere
Contributor
Author
There was a problem hiding this comment.
Will do a refactor commit
src/Metadata/Resource/Factory/ParameterResourceMetadataCollectionFactory.php
Show resolved
Hide resolved
2a6baed to
490a9af
Compare
b687156 to
30649af
Compare
d7a1a2f to
4a202ba
Compare
4a202ba to
2ba4ff4
Compare
|
@Maxcastel The PR description mentions IriFilter, but it looks like this feature is not implemented for that filter. Is it on purpose? It also mentions OrFilter, but I have not used that, so I can't reason if it works/should work or not. |
Member
|
We'll handle IriFilter in another patch. |
soyuka
added a commit
to soyuka/core
that referenced
this pull request
Feb 14, 2026
| Q | A | ------------- | --- | Branch? | main | Tickets | Related to api-platform#7711 | License | MIT | Doc PR | ∅ * Migrate IriFilter to use NestedPropertyHelperTrait for nested properties * Migrate AbstractUuidFilter from OrmPropertyHelperTrait to NestedPropertyHelperTrait * Add comprehensive tests for nested filtering with both filters
soyuka
added a commit
to soyuka/core
that referenced
this pull request
Feb 14, 2026
| Q | A | ------------- | --- | Branch? | main | Tickets | Related to api-platform#7711 | License | MIT | Doc PR | ∅ * Migrate IriFilter to use NestedPropertyHelperTrait for nested properties * Migrate AbstractUuidFilter from OrmPropertyHelperTrait to NestedPropertyHelperTrait * Add comprehensive tests for nested filtering with both filters # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch iri-filter-relation # Changes to be committed: # modified: src/Doctrine/Orm/Filter/AbstractUuidFilter.php # modified: src/Doctrine/Orm/Filter/IriFilter.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Company.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Department.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Employee.php # new file: tests/Functional/NestedFilterTest.php
Contributor
Author
|
I updated description @tjveldhuizen. |
soyuka
added a commit
to soyuka/core
that referenced
this pull request
Feb 16, 2026
| Q | A | ------------- | --- | Branch? | main | Tickets | Related to api-platform#7711 | License | MIT | Doc PR | ∅ * Migrate IriFilter to use NestedPropertyHelperTrait for nested properties * Migrate AbstractUuidFilter from OrmPropertyHelperTrait to NestedPropertyHelperTrait * Add comprehensive tests for nested filtering with both filters # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch iri-filter-relation # Changes to be committed: # modified: src/Doctrine/Orm/Filter/AbstractUuidFilter.php # modified: src/Doctrine/Orm/Filter/IriFilter.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Company.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Department.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Employee.php # new file: tests/Functional/NestedFilterTest.php
soyuka
added a commit
to soyuka/core
that referenced
this pull request
Feb 16, 2026
| Q | A | ------------- | --- | Branch? | main | Tickets | Related to api-platform#7711 | License | MIT | Doc PR | ∅ * Migrate IriFilter to use NestedPropertyHelperTrait for nested properties * Migrate AbstractUuidFilter from OrmPropertyHelperTrait to NestedPropertyHelperTrait * Add comprehensive tests for nested filtering with both filters # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch iri-filter-relation # Changes to be committed: # modified: src/Doctrine/Orm/Filter/AbstractUuidFilter.php # modified: src/Doctrine/Orm/Filter/IriFilter.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Company.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Department.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Employee.php # new file: tests/Functional/NestedFilterTest.php
soyuka
added a commit
to soyuka/core
that referenced
this pull request
Feb 16, 2026
| Q | A | ------------- | --- | Branch? | main | Tickets | Related to api-platform#7711 | License | MIT | Doc PR | ∅ * Migrate IriFilter to use NestedPropertyHelperTrait for nested properties * Migrate AbstractUuidFilter from OrmPropertyHelperTrait to NestedPropertyHelperTrait * Add comprehensive tests for nested filtering with both filters # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch iri-filter-relation # Changes to be committed: # modified: src/Doctrine/Orm/Filter/AbstractUuidFilter.php # modified: src/Doctrine/Orm/Filter/IriFilter.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Company.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Department.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Employee.php # new file: tests/Functional/NestedFilterTest.php
soyuka
added a commit
to soyuka/core
that referenced
this pull request
Feb 16, 2026
| Q | A | ------------- | --- | Branch? | main | Tickets | Related to api-platform#7711 | License | MIT | Doc PR | ∅ * Migrate IriFilter to use NestedPropertyHelperTrait for nested properties * Migrate AbstractUuidFilter from OrmPropertyHelperTrait to NestedPropertyHelperTrait * Add comprehensive tests for nested filtering with both filters # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch iri-filter-relation # Changes to be committed: # modified: src/Doctrine/Orm/Filter/AbstractUuidFilter.php # modified: src/Doctrine/Orm/Filter/IriFilter.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Company.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Department.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Employee.php # new file: tests/Functional/NestedFilterTest.php
soyuka
added a commit
to soyuka/core
that referenced
this pull request
Feb 16, 2026
| Q | A | ------------- | --- | Branch? | main | Tickets | Related to api-platform#7711 | License | MIT | Doc PR | ∅ * Migrate IriFilter to use NestedPropertyHelperTrait for nested properties * Migrate AbstractUuidFilter from OrmPropertyHelperTrait to NestedPropertyHelperTrait * Add comprehensive tests for nested filtering with both filters # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch iri-filter-relation # Changes to be committed: # modified: src/Doctrine/Orm/Filter/AbstractUuidFilter.php # modified: src/Doctrine/Orm/Filter/IriFilter.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Company.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Department.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Employee.php # new file: tests/Functional/NestedFilterTest.php
soyuka
added a commit
to soyuka/core
that referenced
this pull request
Feb 17, 2026
| Q | A | ------------- | --- | Branch? | main | Tickets | Related to api-platform#7711 | License | MIT | Doc PR | ∅ * Migrate IriFilter to use NestedPropertyHelperTrait for nested properties * Migrate AbstractUuidFilter from OrmPropertyHelperTrait to NestedPropertyHelperTrait * Add comprehensive tests for nested filtering with both filters # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch iri-filter-relation # Changes to be committed: # modified: src/Doctrine/Orm/Filter/AbstractUuidFilter.php # modified: src/Doctrine/Orm/Filter/IriFilter.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Company.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Department.php # new file: tests/Fixtures/TestBundle/Entity/FilterNestedTest/Employee.php # new file: tests/Functional/NestedFilterTest.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces support for relation traversal in the following filters:
It allows filtering across nested associations.
Exemples
OneToMany relation filtering
Filter on a related entity property using
propertyparameter:Multi-level relation traversal
Filter on deeply nested properties:
Multiple properties with placeholder
Filter using the
:propertyplaceholder: