File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Overblog \GraphQLBundle \Tests \Functional \App \Validator ;
6+
7+ use Symfony \Component \Validator \AtLeastOneOf as BaseAtLeastOneOf ;
8+ use Symfony \Component \Validator \Constraint ;
9+
10+ if (class_exists (BaseAtLeastOneOf::class)) {
11+ class AtLeastOneOf extends BaseAtLeastOneOf
12+ {
13+ }
14+ } else {
15+ class AtLeastOneOf extends Constraint
16+ {
17+ public string $ message = 'Mock constraint ' ;
18+
19+ /**
20+ * @var array
21+ */
22+ public $ constraints = [];
23+
24+ /**
25+ * @var bool
26+ */
27+ public $ includeInternalMessages = true ;
28+
29+ /**
30+ * @return class-string
31+ */
32+ public function validatedBy (): string
33+ {
34+ return MockValidator::class;
35+ }
36+ }
37+ }
Original file line number Diff line number Diff line change 66 type : String!
77 validation :
88 - Date : ~
9- - AtLeastOneOf :
9+ - Overblog\GraphQLBundle\Tests\Functional\App\Validator\ AtLeastOneOf :
1010 constraints :
1111 - GreaterThanOrEqual : ' -100 years'
1212 message : " Year should be GreaterThanOrEqual -100."
You can’t perform that action at this time.
0 commit comments