File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -217,6 +217,18 @@ more about the expression language syntax, see
217
217
// ...
218
218
}
219
219
220
+ .. versionadded :: 2.6
221
+ Since Symfony 2.6, the Expression constraint doesn't skip ``null ``
222
+ values.
223
+
224
+ Before Symfony 2.6, the expression would never be called if the property
225
+ (e.g. ``isTechnicalPost ``) were ``null ``. Now, if you want to allow ``null ``
226
+ values, you'll have write your expression like this:
227
+
228
+ .. code-block :: text
229
+
230
+ this.getCategory() === null or this.getCategory() in ["php", "symfony"] or !this.isTechnicalPost()
231
+
220
232
For more information about the expression and what variables are available
221
233
to you, see the :ref: `expression <reference-constraint-expression-option >`
222
234
option details below.
You can’t perform that action at this time.
0 commit comments