You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor symfony#58049 [Validator] Add more precise PHPDoc on constraints (alexandre-daubois)
This PR was merged into the 7.2 branch.
Discussion
----------
[Validator] Add more precise PHPDoc on constraints
| Q | A
| ------------- | ---
| Branch? | 7.2
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Issues | -
| License | MIT
Commits
-------
923b0c6 [Validator] Add more precise PHPDoc
Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Constraints/ExpressionSyntax.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ class ExpressionSyntax extends Constraint
33
33
34
34
/**
35
35
* @param array<string,mixed>|null $options
36
-
* @param string|null $service The service used to validate the constraint instead of the default one
36
+
* @param non-empty-string|null $service The service used to validate the constraint instead of the default one
37
37
* @param string[]|null $allowedVariables Restrict the available variables in the expression to these values (defaults to null that allows any variable)
Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Constraints/File.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -73,10 +73,10 @@ class File extends Constraint
73
73
74
74
/**
75
75
* @param array<string,mixed>|null $options
76
-
* @param int|string|null $maxSize The max size of the underlying file
76
+
* @param positive-int|string|null $maxSize The max size of the underlying file
77
77
* @param bool|null $binaryFormat Pass true to use binary-prefixed units (KiB, MiB, etc.) or false to use SI-prefixed units (kB, MB) in displayed messages. Pass null to guess the format from the maxSize option. (defaults to null)
78
78
* @param string[]|string|null $mimeTypes Acceptable media type(s). Prefer the extensions option that also enforce the file's extension consistency.
79
-
* @param int|null $filenameMaxLength Maximum length of the file name
79
+
* @param positive-int|null $filenameMaxLength Maximum length of the file name
80
80
* @param string|null $disallowEmptyMessage Enable empty upload validation with this message in case of error
81
81
* @param string|null $uploadIniSizeErrorMessage Message if the file size exceeds the max size configured in php.ini
82
82
* @param string|null $uploadFormSizeErrorMessage Message if the file size exceeds the max size configured in the HTML input field
Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Constraints/Image.php
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -90,10 +90,10 @@ class Image extends File
90
90
91
91
/**
92
92
* @param array<string,mixed>|null $options
93
-
* @param int|string|null $maxSize The max size of the underlying file
93
+
* @param positive-int|string|null $maxSize The max size of the underlying file
94
94
* @param bool|null $binaryFormat Pass true to use binary-prefixed units (KiB, MiB, etc.) or false to use SI-prefixed units (kB, MB) in displayed messages. Pass null to guess the format from the maxSize option. (defaults to null)
95
-
* @param string[]|null $mimeTypes Acceptable media types
96
-
* @param int|null $filenameMaxLength Maximum length of the file name
95
+
* @param non-empty-string[]|null $mimeTypes Acceptable media types
96
+
* @param positive-int|null $filenameMaxLength Maximum length of the file name
97
97
* @param string|null $disallowEmptyMessage Enable empty upload validation with this message in case of error
98
98
* @param string|null $uploadIniSizeErrorMessage Message if the file size exceeds the max size configured in php.ini
99
99
* @param string|null $uploadFormSizeErrorMessage Message if the file size exceeds the max size configured in the HTML input field
@@ -102,14 +102,14 @@ class Image extends File
102
102
* @param string|null $uploadCantWriteErrorMessage Message if the uploaded file can not be stored in the temporary directory
103
103
* @param string|null $uploadErrorMessage Message if an unknown error occurred on upload
104
104
* @param string[]|null $groups
105
-
* @param int|null $minWidth Minimum image width
106
-
* @param int|null $maxWidth Maximum image width
107
-
* @param int|null $maxHeight Maximum image height
108
-
* @param int|null $minHeight Minimum image weight
109
-
* @param int|float|null $maxRatio Maximum image ratio
0 commit comments