@@ -77,7 +77,7 @@ public function validate($groups = null, bool $throw = true): ?ConstraintViolati
7777
7878 $ this ->buildValidationTree (
7979 $ rootNode ,
80- $ this ->info ->fieldDefinition ->config ['args ' ],
80+ $ this ->info ->fieldDefinition ->config ['args ' ] ?? [] ,
8181 $ classMapping ,
8282 $ this ->resolverArgs ->args ->getArrayCopy ()
8383 );
@@ -95,7 +95,9 @@ public function validate($groups = null, bool $throw = true): ?ConstraintViolati
9595
9696 private function mergeClassValidation (): array
9797 {
98+ /** @phpstan-ignore-next-line */
9899 $ common = static ::normalizeConfig ($ this ->info ->parentType ->config ['validation ' ] ?? []);
100+ /** @phpstan-ignore-next-line */
99101 $ specific = static ::normalizeConfig ($ this ->info ->fieldDefinition ->config ['validation ' ] ?? []);
100102
101103 return array_filter ([
@@ -127,7 +129,7 @@ private function createValidator(MetadataFactory $metadataFactory): ValidatorInt
127129 * Creates a composition of ValidationNode objects from args
128130 * and simultaneously applies to them validation constraints.
129131 */
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
131133 {
132134 $ metadata = new ObjectMetadata ($ rootObject );
133135
@@ -171,6 +173,7 @@ protected function buildValidationTree(ValidationNode $rootObject, array $fields
171173 [$ fqcn , $ property , $ type ] = $ value ;
172174
173175 if (!in_array ($ fqcn , $ this ->cachedMetadata )) {
176+ /** @phpstan-ignore-next-line */
174177 $ this ->cachedMetadata [$ fqcn ] = $ this ->defaultValidator ->getMetadataFor ($ fqcn );
175178 }
176179
@@ -238,6 +241,7 @@ private function createCollectionNode(array $values, $type, ValidationNode $pare
238241 */
239242 private function createObjectNode (array $ value , $ type , ValidationNode $ parent ): ValidationNode
240243 {
244+ /** @phpstan-ignore-next-line */
241245 $ classValidation = static ::normalizeConfig ($ type ->config ['validation ' ] ?? []);
242246
243247 return $ this ->buildValidationTree (
0 commit comments