diff --git a/docs/class-reference.md b/docs/class-reference.md index 97134cb97..8c4e317f6 100644 --- a/docs/class-reference.md +++ b/docs/class-reference.md @@ -309,7 +309,6 @@ Passed as 4th argument to every field resolver. See [docs on field resolving (da @phpstan-import-type QueryPlanOptions from QueryPlan @phpstan-type Path array -@phpstan-type UnaliasedPath list ### GraphQL\Type\Definition\ResolveInfo Props @@ -369,7 +368,7 @@ public $path; * * @var list * - * @phpstan-var UnaliasedPath + * @phpstan-var Path */ public $unaliasedPath; diff --git a/src/Error/Error.php b/src/Error/Error.php index 20e82093d..d644ed103 100644 --- a/src/Error/Error.php +++ b/src/Error/Error.php @@ -36,7 +36,7 @@ class Error extends \Exception implements \JsonSerializable, ClientAware, Provid * corresponds to this error. Only included for errors during execution. * When fields are aliased, the path includes aliases. * - * @var array|null + * @var list|null */ public ?array $path; @@ -75,9 +75,9 @@ class Error extends \Exception implements \JsonSerializable, ClientAware, Provid /** * @param iterable|Node|null $nodes * @param array|null $positions - * @param array|null $path + * @param list|null $path * @param array|null $extensions - * @param list|null $unaliasedPath + * @param list|null $unaliasedPath */ public function __construct( string $message = '', @@ -127,8 +127,8 @@ public function __construct( * * @param mixed $error * @param iterable|Node|null $nodes - * @param array|null $path - * @param list|null $unaliasedPath + * @param list|null $path + * @param list|null $unaliasedPath */ public static function createLocatedError($error, $nodes = null, ?array $path = null, ?array $unaliasedPath = null): Error { @@ -269,7 +269,7 @@ public function getNodes(): ?array * Returns an array describing the path from the root value to the field which produced this error. * Only included for execution errors. When fields are aliased, the path includes aliases. * - * @return array|null + * @return list|null * * @api */ diff --git a/src/Executor/ReferenceExecutor.php b/src/Executor/ReferenceExecutor.php index e3344853b..baa0dd295 100644 --- a/src/Executor/ReferenceExecutor.php +++ b/src/Executor/ReferenceExecutor.php @@ -37,7 +37,6 @@ /** * @phpstan-import-type FieldResolver from Executor * @phpstan-import-type Path from ResolveInfo - * @phpstan-import-type UnaliasedPath from ResolveInfo * * @phpstan-type Fields \ArrayObject> */ @@ -523,7 +522,7 @@ protected function doesFragmentConditionMatch(Node $fragment, ObjectType $type): * Implements the "Evaluating selection sets" section of the spec for "write" mode. * * @param mixed $rootValue - * @param array $path + * @param list $path * @param list $unaliasedPath * @param mixed $contextValue * @@ -587,12 +586,12 @@ function ($results, $responseName) use ($contextValue, $path, $unaliasedPath, $p * serialize scalars, or execute the sub-selection-set for objects. * * @param mixed $rootValue - * @param array $path + * @param list $path * @param list $unaliasedPath * @param mixed $contextValue * * @phpstan-param Path $path - * @phpstan-param UnaliasedPath $unaliasedPath + * @phpstan-param Path $unaliasedPath * * @param \ArrayObject $fieldNodes * @@ -736,12 +735,12 @@ protected function resolveFieldValueOrError( * in the execution context. * * @param \ArrayObject $fieldNodes - * @param array $path + * @param list $path * @param list $unaliasedPath * @param mixed $contextValue * * @phpstan-param Path $path - * @phpstan-param UnaliasedPath $unaliasedPath + * @phpstan-param Path $unaliasedPath * * @param mixed $result * @@ -788,7 +787,7 @@ protected function completeValueCatchingError( /** * @param mixed $rawError * @param \ArrayObject $fieldNodes - * @param array $path + * @param list $path * @param list $unaliasedPath * * @throws Error @@ -835,7 +834,7 @@ protected function handleFieldError($rawError, \ArrayObject $fieldNodes, array $ * value by evaluating all sub-selections. * * @param \ArrayObject $fieldNodes - * @param array $path + * @param list $path * @param list $unaliasedPath * @param mixed $result * @param mixed $contextValue @@ -1053,7 +1052,7 @@ protected function completeLeafValue(LeafType $returnType, &$result) * * @param AbstractType&Type $returnType * @param \ArrayObject $fieldNodes - * @param array $path + * @param list $path * @param list $unaliasedPath * @param array $result * @param mixed $contextValue @@ -1187,7 +1186,7 @@ protected function defaultTypeResolver($value, $contextValue, ResolveInfo $info, * Complete an Object value by executing all sub-selections. * * @param \ArrayObject $fieldNodes - * @param array $path + * @param list $path * @param list $unaliasedPath * @param mixed $result * @param mixed $contextValue @@ -1271,7 +1270,7 @@ protected function invalidReturnTypeError( /** * @param \ArrayObject $fieldNodes - * @param array $path + * @param list $path * @param list $unaliasedPath * @param mixed $result * @param mixed $contextValue @@ -1335,7 +1334,7 @@ protected function collectSubFields(ObjectType $returnType, \ArrayObject $fieldN * Implements the "Evaluating selection sets" section of the spec for "read" mode. * * @param mixed $rootValue - * @param array $path + * @param list $path * @param list $unaliasedPath * @param mixed $contextValue * diff --git a/src/Type/Definition/ResolveInfo.php b/src/Type/Definition/ResolveInfo.php index 0e4ed07bb..dcae8eecf 100644 --- a/src/Type/Definition/ResolveInfo.php +++ b/src/Type/Definition/ResolveInfo.php @@ -19,8 +19,7 @@ * * @phpstan-import-type QueryPlanOptions from QueryPlan * - * @phpstan-type Path array - * @phpstan-type UnaliasedPath list + * @phpstan-type Path list */ class ResolveInfo { @@ -66,7 +65,7 @@ class ResolveInfo * * @api * - * @var array + * @var list * * @phpstan-var Path */ @@ -79,7 +78,7 @@ class ResolveInfo * * @var list * - * @phpstan-var UnaliasedPath + * @phpstan-var Path */ public array $unaliasedPath; @@ -126,11 +125,11 @@ class ResolveInfo /** * @param \ArrayObject $fieldNodes - * @param array $path - * @param array $unaliasedPath + * @param list $path + * @param list $unaliasedPath * * @phpstan-param Path $path - * @phpstan-param UnaliasedPath $unaliasedPath + * @phpstan-param Path $unaliasedPath * * @param array $fragments * @param mixed|null $rootValue