Skip to content

Commit e025536

Browse files
committed
Merge branch '7.1' into 7.2
* 7.1: updating expression language documentation
2 parents aea7997 + 996fe28 commit e025536

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

components/expression_language.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ 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`
97+
if the expression is not valid::
9798

9899
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
99100

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

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

108109
The behavior of these methods can be configured with some flags defined in the
109110
:class:`Symfony\\Component\\ExpressionLanguage\\Parser` class:

0 commit comments

Comments
 (0)