Skip to content

Commit 23a93c2

Browse files
committed
Updating Validator to be usable with Symfony 5
1 parent 05a41fc commit 23a93c2

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"require" : {
2020
"php" : ">=7.2",
2121
"thecodingmachine/graphqlite" : "~4.0.0",
22-
"symfony/validator": "^4.0",
22+
"symfony/validator": "^4 | ^5",
2323
"doctrine/annotations": "^1.6"
2424
},
2525
"require-dev": {

tests/Fixtures/Types/User.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ class User
1313
{
1414
/**
1515
* @Assert\Email(
16-
* message = "The email '{{ value }}' is not a valid email.",
17-
* checkMX = true
16+
* message = "The email '{{ value }}' is not a valid email."
1817
* )
1918
*/
2019
private $email;

tests/IntegrationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function testEndToEndThrowException(): void
6767

6868
$queryString = '
6969
mutation {
70-
createUser(email: "foo@fgdjkerbrtehrthjker.com", password: "short") {
70+
createUser(email: "foofgdjkerbrtehrthjker.com", password: "short") {
7171
email
7272
}
7373
}
@@ -81,7 +81,7 @@ public function testEndToEndThrowException(): void
8181
$result->setErrorFormatter([WebonyxErrorHandler::class, 'errorFormatter']);
8282

8383
$errors = $result->toArray(Debug::RETHROW_UNSAFE_EXCEPTIONS)['errors'];
84-
$this->assertSame('The email \'"foo@fgdjkerbrtehrthjker.com"\' is not a valid email.', $errors[0]['message']);
84+
$this->assertSame('The email \'"foofgdjkerbrtehrthjker.com"\' is not a valid email.', $errors[0]['message']);
8585
$this->assertSame('email', $errors[0]['extensions']['field']);
8686
$this->assertSame('Validate', $errors[0]['extensions']['category']);
8787
$this->assertSame('This value is too short. It should have 8 characters or more.', $errors[1]['message']);

0 commit comments

Comments
 (0)