Skip to content

Commit 935cb00

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: (43 commits) [AssetMapper] Fix entrypoint scripts are not preloaded Fix typo in method resolvePackages Make FormPerformanceTestCase compatible with PHPUnit 10 Avoid calling getInvocationCount() [AssetMapper] Always downloading vendor files [Security] Fix resetting traceable listeners [HttpClient] Fix type error with http_version 1.1 [DependencyInjection] Add tests for `AutowireLocator`/`AutowireIterator` [DependencyInjection] Add `#[AutowireIterator]` attribute and improve `#[AutowireLocator]` Update documentation link Fix typo that causes unit test to fail Fix CS [AssetMapper] Add audit command [Mailer] Use idn encoded address otherwise Brevo throws an error [Messenger] Resend failed retries back to failure transport [FrameworkBundle] Fix call to invalid method in NotificationAssertionsTrait [Validator] Add missing italian translations [Notifier] Fix failing testcase Fix order array sum normalizedData and nestedData Add test for 0 and '0' in PeriodicalTrigger Fix '0' case error and remove duplicate code ...
2 parents 44ef3ac + 23f482a commit 935cb00

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

ArgumentResolver/EntityValueResolver.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,10 @@ private function findViaExpression(ObjectManager $manager, Request $request, Map
199199
}
200200

201201
$repository = $manager->getRepository($options->class);
202-
$variables = array_merge($request->attributes->all(), ['repository' => $repository]);
202+
$variables = array_merge($request->attributes->all(), [
203+
'repository' => $repository,
204+
'request' => $request,
205+
]);
203206

204207
try {
205208
return $this->expressionLanguage->evaluate($options->expr, $variables);

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ CHANGELOG
2121
* Deprecate not constructing `DoctrineDataCollector` with an instance of `DebugDataHolder`
2222
* Deprecate `DoctrineDataCollector::addLogger()`, use a `DebugDataHolder` instead
2323
* Deprecate `ContainerAwareLoader`, use dependency injection in your fixtures instead
24+
* Always pass the `Request` object to `EntityValueResolver`'s expression
2425

2526
6.3
2627
---

Tests/ArgumentResolver/EntityValueResolverTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ public function testExpressionMapsToArgument()
334334
->method('evaluate')
335335
->with('repository.findOneByCustomMethod(id)', [
336336
'repository' => $repository,
337+
'request' => $request,
337338
'id' => 5,
338339
])
339340
->willReturn($object = new \stdClass());

0 commit comments

Comments
 (0)