Skip to content

Commit e21bd91

Browse files
committed
Merge pull request #145 from FriendsOfSymfony/fix-expressionlanguage-dependency
fix expression language dependency to only use with expressions
2 parents 0db55d8 + 76cd62b commit e21bd91

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

EventListener/InvalidationSubscriber.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ private function invalidateRoutes(array $routes, Request $request)
205205
$values = $request->attributes->all();
206206
// if there is an attribute called "request", it needs to be accessed through the request.
207207
$values['request'] = $request;
208-
$expressionLanguage = $this->getExpressionLanguage();
209208

210209
foreach ($routes as $route) {
211210
$params = array();
@@ -214,7 +213,7 @@ private function invalidateRoutes(array $routes, Request $request)
214213
// Iterate over route params and try to evaluate their values
215214
foreach ($route->getParams() as $key => $value) {
216215
if (is_array($value)) {
217-
$value = $expressionLanguage->evaluate($value['expression'], $values);
216+
$value = $this->getExpressionLanguage()->evaluate($value['expression'], $values);
218217
}
219218

220219
$params[$key] = $value;

0 commit comments

Comments
 (0)