8000 minor #51710 [Validator] Fix `File::$extensions`’ PHPDoc (MatTheCat) · symfony/symfony@4f085f8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4f085f8

Browse files
minor #51710 [Validator] Fix File::$extensions’ PHPDoc (MatTheCat)
This PR was merged into the 6.3 branch. Discussion ---------- [Validator] Fix `File::$extensions`’ PHPDoc | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A [The documentation’s example](https://symfony.com/doc/current/reference/constraints/File.html#extensions) is incompatible with the current PHPDoc because keys can be integers **and** strings in a single array: ![image](https://github.com/symfony/symfony/assets/1898254/ab9d47be-2f8e-4e7c-9a7b-6fea3efd73c9) It would now accept `string[][]` as well, but a false positive seems better to me than a false negative. Commits ------- 2dd8ad2 [Validator] Fix `File::$extensions`’ PHPDoc
2 parents e39ff93 + 2dd8ad2 commit 4f085f8

File tree

1 file changed

+1
-1
lines changed
  • src/Symfony/Component/Validator/Constraints

1 file changed

+1
-1
lines changed

src/Symfony/Component/Validator/Constraints/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class File extends Constraint
7373
protected $maxSize;
7474

7575
/**
76-
* @param array<string, string|string[]>|string[]|string $extensions
76+
* @param array<string|string[]>|string $extensions
7777
*/
7878
public function __construct(
7979
array $options = null,

0 commit comments

Comments
 (0)
0