Skip to content

Commit 346ca91

Browse files
committed
feature #19958 [ExpressionLanguage] Document the null-coalesce operator changes (javiereguiluz)
This PR was merged into the 7.2 branch. Discussion ---------- [ExpressionLanguage] Document the null-coalesce operator changes Fixes #19928. Commits ------- 0624d24 [ExpressionLanguage] Document the null-coalesce operator changes
2 parents 8ca9999 + 0624d24 commit 346ca91

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

reference/formats/expression_language.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,10 @@ returns the right-hand side. Expressions can chain multiple coalescing operators
124124
* ``foo[3] ?? 'no'``
125125
* ``foo.baz ?? foo['baz'] ?? 'no'``
126126

127-
.. note::
127+
.. versionadded:: 7.2
128128

129-
The main difference with the `null-coalescing operator in PHP`_ is that
130-
ExpressionLanguage will throw an exception when trying to access a
131-
non-existent variable.
129+
Starting from Symfony 7.2, no exception is thrown when trying to access a
130+
non-existent variable. This is the same behavior as the `null-coalescing operator in PHP`_.
132131

133132
.. _component-expression-functions:
134133

0 commit comments

Comments
 (0)