8000 minor #17677 [Validator] Update constraint Type types (alamirault) · symfony/symfony-docs@0223c76 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0223c76

Browse files
committed
minor #17677 [Validator] Update constraint Type types (alamirault)
This PR was merged into the 5.4 branch. Discussion ---------- [Validator] Update constraint Type types Follow of #17665 New sort is same like code https://github.com/symfony/symfony/blob/ed96673e64ebaca3f47012c230823dcddd59a2ba/src/Symfony/Component/Validator/Constraints/TypeValidator.php#L23-L52 No type is deprecated so for now I think we should document all available types Commits ------- 60dab01 Update constraint Type types
2 parents af59eb8 + 60dab01 commit 0223c76

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

reference/constraints/Type.rst

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -206,22 +206,24 @@ This required option defines the type or collection of types allowed for the
206206
given value. Each type is either the FQCN (fully qualified class name) of some
207207
PHP class/interface or a valid PHP datatype (checked by PHP's ``is_()`` functions):
208208

209-
* :phpfunction:`array <is_array>`
210209
* :phpfunction:`bool <is_bool>`
211-
* :phpfunction:`callable <is_callable>`
212-
* :phpfunction:`float <is_float>`
213-
* :phpfunction:`double <is_double>`
210+
* :phpfunction:`boolean <is_bool>`
214211
* :phpfunction:`int <is_int>`
215-
* :phpfunction:`integer <is_integer>`
216-
* :phpfunction:`iterable <is_iterable>`
217-
* :phpfunction:`long <is_long>`
218-
* :phpfunction:`null <is_null>`
212+
* :phpfunction:`integer <is_int>`
213+
* :phpfunction:`long <is_int>`
214+
* :phpfunction:`float <is_float>`
215+
* :phpfunction:`double <is_float>`
216+
* :phpfunction:`real <is_float>`
219217
* :phpfunction:`numeric <is_numeric>`
218+
* :phpfunction:`string <is_string>`
219+
* :phpfunction:`scalar <is_scalar>`
220+
* :phpfunction:`array <is_array>`
221+
* :phpfunction:`iterable <is_iterable>`
222+
* :phpfunction:`countable <is_countable>`
223+
* :phpfunction:`callable <is_callable>`
220224
* :phpfunction:`object <is_object>`
221-
* :phpfunction:`real <is_real>`
222225
* :phpfunction:`resource <is_resource>`
223-
* :phpfunction:`scalar <is_scalar>`
224-
* :phpfunction:`string <is_string>`
226+
* :phpfunction:`null <is_null>`
225227

226228
Also, you can use ``ctype_*()`` functions from corresponding
227229
`built-in PHP extension`_. Consider `a list of ctype functions`_:

0 commit comments

Comments
 (0)
0