File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,11 @@ PHP class/interface or a valid PHP datatype (checked by PHP's ``is_()`` function
190190* :phpfunction: `resource <is_resource> `
191191* :phpfunction: `null <is_null> `
192192
193+ If you're dealing with arrays, you can use the following types in the constraint:
194+
195+ * ``list `` which uses :phpfunction: `array_is_list <array_is_list> ` internally
196+ * ``associative_array `` which is true for any **non-empty ** array that is not a list
197+
193198Also, you can use ``ctype_*() `` functions from corresponding
194199`built-in PHP extension `_. Consider `a list of ctype functions `_:
195200
@@ -208,6 +213,11 @@ Also, you can use ``ctype_*()`` functions from corresponding
208213Make sure that the proper :phpfunction: `locale <setlocale> ` is set before
209214using one of these.
210215
216+ .. versionadded :: 7.1
217+
218+ The ``list `` and ``associative_array `` types were introduced in Symfony
219+ 7.1.
220+
211221Finally, you can use aggregated functions:
212222
213223* ``number ``: ``is_int || is_float && !is_nan ``
You can’t perform that action at this time.
0 commit comments