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
190
190
* :phpfunction: `resource <is_resource> `
191
191
* :phpfunction: `null <is_null> `
192
192
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
+
193
198
Also, you can use ``ctype_*() `` functions from corresponding
194
199
`built-in PHP extension `_. Consider `a list of ctype functions `_:
195
200
@@ -208,6 +213,11 @@ Also, you can use ``ctype_*()`` functions from corresponding
208
213
Make sure that the proper :phpfunction: `locale <setlocale> ` is set before
209
214
using one of these.
210
215
216
+ .. versionadded :: 7.1
217
+
218
+ The ``list `` and ``associative_array `` types were introduced in Symfony
219
+ 7.1.
220
+
211
221
Finally, you can use aggregated functions:
212
222
213
223
* ``number ``: ``is_int || is_float && !is_nan ``
You can’t perform that action at this time.
0 commit comments