Skip to content

Commit 3d2a697

Browse files
committed
minor #20351 [ExpressionLanguage] fix lint method description (decima)
This PR was submitted for the 7.1 branch but it was merged into the 6.4 branch instead. Discussion ---------- [ExpressionLanguage] fix lint method description At first, I made a fix pr [#58679](symfony/symfony#58679), but someone suggested to make a doc fix. I think it's pretty weird to have a linting method throwing exception as its task is to tell if the expression is valid or not. 🤔 Commits ------- d558cc8 updating expression language documentation
2 parents a72ab10 + d558cc8 commit 3d2a697

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/expression_language.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ The :method:`Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage::parse`
9393
method returns a :class:`Symfony\\Component\\ExpressionLanguage\\ParsedExpression`
9494
instance that can be used to inspect and manipulate the expression. The
9595
:method:`Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage::lint`, on the
96-
other hand, returns a boolean indicating if the expression is valid or not::
96+
other hand, throws a :class:`Symfony\\Component\\ExpressionLanguage\\SyntaxError` if the expression is not valid::
9797

9898
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
9999

@@ -103,7 +103,7 @@ other hand, returns a boolean indicating if the expression is valid or not::
103103
// displays the AST nodes of the expression which can be
104104
// inspected and manipulated
105105

106-
var_dump($expressionLanguage->lint('1 + 2', [])); // displays true
106+
$expressionLanguage->lint('1 + 2', []); // doesn't throw anything
107107

108108
Passing in Variables
109109
--------------------

0 commit comments

Comments
 (0)