Skip to content

Commit def9d46

Browse files
committed
Remove Symfony 4.4 checks
1 parent 6db603e commit def9d46

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed

src/Validator/Constraints/ExpressionValidator.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Overblog\GraphQLBundle\ExpressionLanguage\ExpressionLanguage;
99
use Overblog\GraphQLBundle\Generator\TypeGenerator;
1010
use Overblog\GraphQLBundle\Validator\ValidationNode;
11-
use Symfony\Component\HttpKernel\Kernel;
1211
use Symfony\Component\Validator\Constraint;
1312
use Symfony\Component\Validator\Constraints\Expression;
1413
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
@@ -23,11 +22,8 @@ public function __construct(ExpressionLanguage $expressionLanguage, GraphQLServi
2322
{
2423
$this->expressionLanguage = $expressionLanguage;
2524
$this->graphQLServices = $graphQLServices;
26-
if (Kernel::VERSION_ID >= 40400) {
27-
parent::__construct($expressionLanguage); // @phpstan-ignore-line
28-
} else {
29-
parent::__construct(null, $expressionLanguage); // @phpstan-ignore-line
30-
}
25+
26+
parent::__construct($expressionLanguage); // @phpstan-ignore-line
3127
}
3228

3329
/**

tests/Functional/Validator/ExpectedErrors.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
namespace Overblog\GraphQLBundle\Tests\Functional\Validator;
66

7-
use Symfony\Component\HttpKernel\Kernel;
8-
97
class ExpectedErrors
108
{
119
public const LINKED_CONSTRAINTS = [
@@ -133,22 +131,12 @@ public static function cascadeWithGroups(string $fieldName): array
133131
],
134132
],
135133
'birthdate.day' => [
136-
[
137-
'message' => 'This value should be 31 or less.',
138-
'code' => '2d28afcb-e32e-45fb-a815-01c431a86a69',
139-
],
140-
],
141-
];
142-
143-
// @phpstan-ignore-next-line
144-
if (Kernel::VERSION_ID >= 40400) {
145-
$validation['birthdate.day'] = [
146134
[
147135
'message' => 'This value should be between 1 and 31.',
148136
'code' => '04b91c99-a946-4221-afc5-e65ebac401eb',
149137
],
150-
];
151-
}
138+
],
139+
];
152140

153141
return [
154142
'message' => 'validation',

0 commit comments

Comments
 (0)