From 1afb7fcc158c94754844046ae2d5c25df8a04d7c Mon Sep 17 00:00:00 2001 From: homersimpsons Date: Wed, 10 May 2023 00:12:50 +0200 Subject: [PATCH 1/3] :memo: Document `Parser->parseWithoutContext` --- components/expression_language.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/expression_language.rst b/components/expression_language.rst index 33fdcae8de2..ab43926ab87 100644 --- a/components/expression_language.rst +++ b/components/expression_language.rst @@ -234,6 +234,13 @@ method after parsing any expression to get its AST:: // dump the AST nodes as a string representation $astAsString = $ast->dump(); +.. note:: + The :method:`Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage::parse` + method requires you to be specific about the possible variables and functions. + If you do not need to specify them (e.g. for evaluating the AST in another + engine or to extract some insight from it) you can use the + :method:`Symfony\\Component\\ExpressionLanguage\\Parser::parseWithoutContext` method. + Manipulating the AST ~~~~~~~~~~~~~~~~~~~~ From b85369be3198d4e97df98aedc6eaed9c8685885e Mon Sep 17 00:00:00 2001 From: homersimpsons Date: Wed, 10 May 2023 00:20:04 +0200 Subject: [PATCH 2/3] :rotating_light: Add blank line after `.. note::` --- components/expression_language.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/components/expression_language.rst b/components/expression_language.rst index ab43926ab87..7c8a26332e8 100644 --- a/components/expression_language.rst +++ b/components/expression_language.rst @@ -235,6 +235,7 @@ method after parsing any expression to get its AST:: $astAsString = $ast->dump(); .. note:: + The :method:`Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage::parse` method requires you to be specific about the possible variables and functions. If you do not need to specify them (e.g. for evaluating the AST in another From aee8cc25a2cf874783499f656ddc822d57dfa98e Mon Sep 17 00:00:00 2001 From: homersimpsons Date: Fri, 19 May 2023 15:56:01 +0200 Subject: [PATCH 3/3] :memo: Add note for version added Co-authored-by: Oskar Stark --- components/expression_language.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/expression_language.rst b/components/expression_language.rst index 7c8a26332e8..9c2296c6a19 100644 --- a/components/expression_language.rst +++ b/components/expression_language.rst @@ -242,6 +242,10 @@ method after parsing any expression to get its AST:: engine or to extract some insight from it) you can use the :method:`Symfony\\Component\\ExpressionLanguage\\Parser::parseWithoutContext` method. + .. versionadded:: 6.4 + + The `parseWithoutContext` method was introduced in Symfony 6.4. + Manipulating the AST ~~~~~~~~~~~~~~~~~~~~