You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (null !== $accessMetadata || null !== $publicMetadata) {
570
573
thrownewInvalidArgumentException(sprintf('The metadatas %s and/or %s defined on "%s" are only usable in addition of metadata %s', self::formatMetadata('Access'), self::formatMetadata('Visible'), $reflector->getName(), self::formatMetadata('Field')));
@@ -573,7 +576,7 @@ private static function getTypeFieldConfigurationFromReflector(ReflectionClass $
573
576
return [];
574
577
}
575
578
576
-
if ($reflectorinstanceof ReflectionMethod && !$reflector->isPublic()) {
579
+
if ($isMethod && !$reflector->isPublic()) {
577
580
thrownewInvalidArgumentException(sprintf('The metadata %s can only be applied to public method. The method "%s" is not public.', self::formatMetadata('Field'), $reflector->getName()));
578
581
}
579
582
@@ -591,7 +594,13 @@ private static function getTypeFieldConfigurationFromReflector(ReflectionClass $
if ($isMethod && !in_array($arg->name, $validArgNames, true)) {
601
+
thrownewInvalidArgumentException(sprintf('The argument "%s" defined with #[GQL\Arg] attribute/annotation on method "%s" does not match any parameter name in the method.', $arg->name, $reflector->getName()));
602
+
}
603
+
595
604
$args[$arg->name] = ['type' => $arg->type];
596
605
597
606
if (isset($arg->description)) {
@@ -606,7 +615,7 @@ private static function getTypeFieldConfigurationFromReflector(ReflectionClass $
0 commit comments