Skip to content

Commit e558680

Browse files
fancywebnicolas-grekas
authored andcommitted
[ExpressionLanguage] Fix BC of cached SerializedParsedExpression containing GetAttrNode
1 parent e1f7790 commit e558680

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Node/GetAttrNode.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,4 +149,15 @@ public function toArray()
149149
return [$this->nodes['node'], '[', $this->nodes['attribute'], ']'];
150150
}
151151
}
152+
153+
/**
154+
* Provides BC with instances serialized before v6.2
155+
*/
156+
public function __unserialize(array $data): void
157+
{
158+
$this->nodes = $data['nodes'];
159+
$this->attributes = $data['attributes'];
160+
$this->attributes['is_null_coalesce'] ??= false;
161+
$this->attributes['is_short_circuited'] ??= $data["\x00Symfony\Component\ExpressionLanguage\Node\GetAttrNode\x00isShortCircuited"] ?? false;
162+
}
152163
}

0 commit comments

Comments
 (0)