You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature symfony#53365 [DoctrineBridge] Allow EntityValueResolver to return a list of entities (HypeMC)
This PR was merged into the 7.1 branch.
Discussion
----------
[DoctrineBridge] Allow `EntityValueResolver` to return a list of entities
| Q | A
| ------------- | ---
| Branch? | 7.1
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Issues | Fixsymfony#53236 (sort of)
| License | MIT
Makes the following possible:
```php
#[Route('/{author_id}', name: 'app_test')]
public function index(
#[MapEntity(class: Post::class, expr: 'repository.findBy({"author": author_id}, {}, 10)')]
iterable $posts
): Response {
// ...
}
```
This is actually something that used to be possible with the SensioFrameworkExtraBundle.
Commits
-------
165524c [DoctrineBridge] Allow `EntityValueResolver` to return a list of entities
thrownew \LogicException(sprintf('You cannot use the "%s" if the ExpressionLanguage component is not available. Try running "composer require symfony/expression-language".', __CLASS__));
0 commit comments