File tree Expand file tree Collapse file tree 8 files changed +16
-9
lines changed
ExpressionLanguage/ExpressionFunction/GraphQL Expand file tree Collapse file tree 8 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -321,8 +321,8 @@ private static function typeAnnotationToGQLConfiguration(
321
321
private static function getAnnotationReader (): AnnotationReader
322
322
{
323
323
if (null === self ::$ annotationReader ) {
324
- if (!class_exists ('\\ Doctrine \\ Common \\ Annotations \\ AnnotationReader ' ) ||
325
- !class_exists ('\\ Doctrine \\ Common \\ Annotations \\ AnnotationRegistry ' )) {
324
+ if (!class_exists (AnnotationReader::class ) ||
325
+ !class_exists (AnnotationRegistry::class )) {
326
326
throw new RuntimeException ('In order to use graphql annotation, you need to require doctrine annotations ' );
327
327
}
328
328
Original file line number Diff line number Diff line change 31
31
use Symfony \Component \DependencyInjection \Reference ;
32
32
use Symfony \Component \EventDispatcher \EventDispatcherInterface ;
33
33
use Symfony \Component \HttpKernel \DependencyInjection \Extension ;
34
+ use Symfony \Component \Validator \Validation ;
34
35
use function array_fill_keys ;
35
36
use function class_exists ;
36
37
use function realpath ;
@@ -105,7 +106,7 @@ private function registerForAutoconfiguration(ContainerBuilder $container): void
105
106
106
107
private function registerValidatorFactory (ContainerBuilder $ container ): void
107
108
{
108
- if (class_exists (' Symfony \\ Component \\ Validator \\ Validation ' )) {
109
+ if (class_exists (Validation::class )) {
109
110
$ container ->register (ValidatorFactory::class)
110
111
->setArguments ([
111
112
new Reference ('validator.validator_factory ' ),
Original file line number Diff line number Diff line change 12
12
use PHPUnit \Framework \TestCase ;
13
13
use Symfony \Component \Validator \ConstraintViolation ;
14
14
use Symfony \Component \Validator \ConstraintViolationList ;
15
+ use Symfony \Component \Validator \Validation ;
15
16
use function class_exists ;
16
17
17
18
class ValidationErrorsListenerTest extends TestCase
@@ -21,7 +22,7 @@ class ValidationErrorsListenerTest extends TestCase
21
22
22
23
protected function setUp (): void
23
24
{
24
- if (!class_exists (' Symfony \\ Component \\ Validator \\ Validation ' )) {
25
+ if (!class_exists (Validation::class )) {
25
26
$ this ->markTestSkipped ('Symfony validator component is not installed ' );
26
27
}
27
28
$ this ->listener = new ValidationErrorsListener ();
Original file line number Diff line number Diff line change 15
15
use Overblog \GraphQLBundle \Tests \Transformer \InputType1 ;
16
16
use Overblog \GraphQLBundle \Tests \Transformer \InputType2 ;
17
17
use Overblog \GraphQLBundle \Transformer \ArgumentsTransformer ;
18
+ use Symfony \Component \Validator \Validation ;
18
19
use Symfony \Component \Validator \Validator \RecursiveValidator ;
19
20
use function class_exists ;
20
21
use function count ;
@@ -23,7 +24,7 @@ class ArgumentsTest extends TestCase
23
24
{
24
25
public function setUp (): void
25
26
{
26
- if (!class_exists (' Symfony \\ Component \\ Validator \\ Validation ' )) {
27
+ if (!class_exists (Validation::class )) {
27
28
$ this ->markTestSkipped ('Symfony validator component is not installed ' );
28
29
}
29
30
parent ::setUp ();
Original file line number Diff line number Diff line change 5
5
namespace Overblog \GraphQLBundle \Tests \Functional \Validator ;
6
6
7
7
use Overblog \GraphQLBundle \Tests \Functional \TestCase ;
8
+ use Symfony \Component \Validator \Validation ;
8
9
use function class_exists ;
9
10
use function json_decode ;
10
11
@@ -13,7 +14,7 @@ class InputValidatorTest extends TestCase
13
14
protected function setUp (): void
14
15
{
15
16
parent ::setUp ();
16
- if (!class_exists (' Symfony \\ Component \\ Validator \\ Validation ' )) {
17
+ if (!class_exists (Validation::class )) {
17
18
$ this ->markTestSkipped ('Symfony validator component is not installed ' );
18
19
}
19
20
static ::bootKernel (['test_case ' => 'validator ' ]);
Original file line number Diff line number Diff line change 16
16
use PHPUnit \Framework \TestCase ;
17
17
use Symfony \Component \Validator \ConstraintViolation ;
18
18
use Symfony \Component \Validator \ConstraintViolationList ;
19
+ use Symfony \Component \Validator \Validation ;
19
20
use Symfony \Component \Validator \Validator \RecursiveValidator ;
20
21
use function class_exists ;
21
22
use function count ;
@@ -26,7 +27,7 @@ class ArgumentsTransformerTest extends TestCase
26
27
protected function setUp (): void
27
28
{
28
29
parent ::setUp ();
29
- if (!class_exists (' Symfony \\ Component \\ Validator \\ Validation ' )) {
30
+ if (!class_exists (Validation::class )) {
30
31
$ this ->markTestSkipped ('Symfony validator component is not installed ' );
31
32
}
32
33
}
Original file line number Diff line number Diff line change 9
9
use PHPUnit \Framework \TestCase ;
10
10
use Symfony \Component \DependencyInjection \Exception \ServiceNotFoundException ;
11
11
use Symfony \Component \Validator \ConstraintValidatorFactory ;
12
+ use Symfony \Component \Validator \Validation ;
12
13
use function class_exists ;
13
14
14
15
class InputValidatorTest extends TestCase
15
16
{
16
17
public function setUp (): void
17
18
{
18
19
parent ::setUp ();
19
- if (!class_exists (' Symfony \\ Component \\ Validator \\ Validation ' )) {
20
+ if (!class_exists (Validation::class )) {
20
21
$ this ->markTestSkipped ('Symfony validator component is not installed ' );
21
22
}
22
23
}
Original file line number Diff line number Diff line change 11
11
use PHPUnit \Framework \TestCase ;
12
12
use stdClass ;
13
13
use Symfony \Component \Validator \Exception \NoSuchMetadataException ;
14
+ use Symfony \Component \Validator \Validation ;
14
15
use function class_exists ;
15
16
16
17
class MetadataFactoryTest extends TestCase
17
18
{
18
19
public function setUp (): void
19
20
{
20
- if (!class_exists (' Symfony \\ Component \\ Validator \\ Validation ' )) {
21
+ if (!class_exists (Validation::class )) {
21
22
$ this ->markTestSkipped ('Symfony validator component is not installed ' );
22
23
}
23
24
parent ::setUp ();
You can’t perform that action at this time.
0 commit comments