Skip to content

Commit

Permalink
Composer: allow symfony 6.x (#9)
Browse files Browse the repository at this point in the history
* Composer: allow symfony 6.x

* fixup

* add ContainerConstraintValidatorFactory::getInstance() return type

Co-authored-by: Jiří Pudil <[email protected]>
  • Loading branch information
f3l1x and jiripudil authored Dec 30, 2021
1 parent b6ce363 commit 9e104d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"require": {
"php": ">=7.4",
"nette/di": "^3.0.1",
"symfony/cache": "^5.0",
"symfony/config": "^5.0",
"symfony/validator": "^5.2"
"symfony/cache": "^5.0 || ^6.0",
"symfony/config": "^5.0 || ^6.0",
"symfony/validator": "^5.2 || ^6.0"
},
"require-dev": {
"doctrine/annotations": "^1.8",
Expand Down
2 changes: 1 addition & 1 deletion src/ContainerConstraintValidatorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(Container $container)
* @throws ValidatorException when the validator class does not exist
* @throws UnexpectedTypeException when the validator is not an instance of ConstraintValidatorInterface
*/
public function getInstance(Constraint $constraint)
public function getInstance(Constraint $constraint): ConstraintValidatorInterface
{
/** @var class-string<ConstraintValidatorInterface> $name */
$name = $constraint->validatedBy();
Expand Down

0 comments on commit 9e104d9

Please sign in to comment.