@@ -77,7 +77,7 @@ public function validate($groups = null, bool $throw = true): ?ConstraintViolati
77
77
78
78
$ this ->buildValidationTree (
79
79
$ rootNode ,
80
- $ this ->info ->fieldDefinition ->config ['args ' ],
80
+ $ this ->info ->fieldDefinition ->config ['args ' ] ?? [] ,
81
81
$ classMapping ,
82
82
$ this ->resolverArgs ->args ->getArrayCopy ()
83
83
);
@@ -95,7 +95,9 @@ public function validate($groups = null, bool $throw = true): ?ConstraintViolati
95
95
96
96
private function mergeClassValidation (): array
97
97
{
98
+ /** @phpstan-ignore-next-line */
98
99
$ common = static ::normalizeConfig ($ this ->info ->parentType ->config ['validation ' ] ?? []);
100
+ /** @phpstan-ignore-next-line */
99
101
$ specific = static ::normalizeConfig ($ this ->info ->fieldDefinition ->config ['validation ' ] ?? []);
100
102
101
103
return array_filter ([
@@ -127,7 +129,7 @@ private function createValidator(MetadataFactory $metadataFactory): ValidatorInt
127
129
* Creates a composition of ValidationNode objects from args
128
130
* and simultaneously applies to them validation constraints.
129
131
*/
130
- protected function buildValidationTree (ValidationNode $ rootObject , array $ fields , array $ classValidation , array $ inputData ): ValidationNode
132
+ private function buildValidationTree (ValidationNode $ rootObject , iterable $ fields , array $ classValidation , array $ inputData ): ValidationNode
131
133
{
132
134
$ metadata = new ObjectMetadata ($ rootObject );
133
135
@@ -171,6 +173,7 @@ protected function buildValidationTree(ValidationNode $rootObject, array $fields
171
173
[$ fqcn , $ property , $ type ] = $ value ;
172
174
173
175
if (!in_array ($ fqcn , $ this ->cachedMetadata )) {
176
+ /** @phpstan-ignore-next-line */
174
177
$ this ->cachedMetadata [$ fqcn ] = $ this ->defaultValidator ->getMetadataFor ($ fqcn );
175
178
}
176
179
@@ -238,6 +241,7 @@ private function createCollectionNode(array $values, $type, ValidationNode $pare
238
241
*/
239
242
private function createObjectNode (array $ value , $ type , ValidationNode $ parent ): ValidationNode
240
243
{
244
+ /** @phpstan-ignore-next-line */
241
245
$ classValidation = static ::normalizeConfig ($ type ->config ['validation ' ] ?? []);
242
246
243
247
return $ this ->buildValidationTree (
0 commit comments