8000 minor #5544 [components][expression_language] Fix the wrong construct… · symfony/symfony-docs@d5133bb · GitHub
[go: up one dir, main page]

Skip to content

Commit d5133bb

Browse files
committed
minor #5544 [components][expression_language] Fix the wrong constructor for SerializedParsedExpression (zerustech)
This PR was submitted for the 2.5 branch but it was merged into the 2.6 branch instead (closes #5544). Discussion ---------- [components][expression_language] Fix the wrong constructor for SerializedParsedExpression SerializedParsedExpression There is a bug in the code snippet for creating a SerializedParsedExpression instance in chapter "Using Parsed and Serialized Expressions" | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | Commits ------- d3f6c24 [components][expression_language] Fix the wrong constructor for SerializedParsedExpression
2 parents a4b51a6 + d3f6c24 commit d5133bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/expression_language/caching.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Both ``evaluate()`` and ``compile()`` can handle ``ParsedExpression`` and
6565
6666
$expression = new SerializedParsedExpression(
6767
'1 + 4',
68-
serialize($language->parse('1 + 4', array()))
68+
serialize($language->parse('1 + 4', array())->getNodes())
6969
);
7070
7171
var_dump($language->evaluate($expression)); // prints 5

0 commit comments

Comments
 (0)
0