Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix recent phptan errors #1147

Merged
merged 2 commits into from
Oct 7, 2024
Merged

Fix recent phptan errors #1147

merged 2 commits into from
Oct 7, 2024

Conversation

mfn
Copy link
Collaborator

@mfn mfn commented Oct 7, 2024

Summary

Fixes the ones from https://github.com/rebing/graphql-laravel/actions/runs/11207964245/job/31150947788

Error: Ignored error pattern #^Property GraphQL\\Type\\Definition\\ObjectType\:\:\$config \(array\{name\?\: string\|null, description\?\: string\|null, resolveField\?\: \(callable\(mixed, array\<string, mixed\>, mixed, GraphQL\\Type\\Definition\\ResolveInfo\)\: mixed\)\|null, fields\: \(callable\(\)\: iterable\)\|iterable, interfaces\?\: \(callable\(\)\: iterable\<callable\(\)\: GraphQL\\Type\\Definition\\InterfaceType\|GraphQL\\Type\\Definition\\InterfaceType\>\)\|iterable\<\(callable\(\)\: GraphQL\\Type\\Definition\\InterfaceType\)\|GraphQL\\Type\\Definition\\InterfaceType\>, isTypeOf\?\: \(callable\(mixed, mixed, GraphQL\\Type\\Definition\\ResolveInfo\)\: \(bool\|GraphQL\\Deferred\|null\)\)\|null, astNode\?\: GraphQL\\Language\\AST\\ObjectTypeDefinitionNode\|null, extensionASTNodes\?\: array\<int, GraphQL\\Language\\AST\\ObjectTypeExtensionNode\>\|null\}\) does not accept non\-empty\-array\<string, \(callable\(\)\: iterable\)\|\(callable\(mixed, array\<string, mixed\>, mixed, GraphQL\\Type\\Definition\\ResolveInfo\)\: mixed\)\|\(callable\(mixed, mixed, GraphQL\\Type\\Definition\\ResolveInfo\)\: \(bool\|GraphQL\\Deferred\|null\)\)\|GraphQL\\Language\\AST\\ObjectTypeDefinitionNode\|iterable\|string\|null\>\.$# in path /home/runner/work/graphql-laravel/graphql-laravel/src/GraphQL.php was not matched in reported errors.
Error: Property GraphQL\Type\Definition\ObjectType::$config (array{name?: string|null, description?: string|null, resolveField?: (callable(mixed, array<string, mixed>, mixed, GraphQL\Type\Definition\ResolveInfo): mixed)|null, fields: (callable(): iterable)|iterable, interfaces?: (callable(): iterable<callable(): GraphQL\Type\Definition\InterfaceType|GraphQL\Type\Definition\InterfaceType>)|iterable<(callable(): GraphQL\Type\Definition\InterfaceType)|GraphQL\Type\Definition\InterfaceType>, isTypeOf?: (callable(mixed, mixed, GraphQL\Type\Definition\ResolveInfo): (bool|GraphQL\Deferred|null))|null, astNode?: GraphQL\Language\AST\ObjectTypeDefinitionNode|null, extensionASTNodes?: array<int, GraphQL\Language\AST\ObjectTypeExtensionNode>|null}) does not accept array{name?: string|null, description?: string|null, resolveField?: (callable(mixed, array<string, mixed>, mixed, GraphQL\Type\Definition\ResolveInfo): mixed)|string|null, fields: (callable(): iterable)|iterable|string, interfaces?: (callable(): iterable<callable(): GraphQL\Type\Definition\InterfaceType|GraphQL\Type\Definition\InterfaceType>)|iterable<(callable(): GraphQL\Type\Definition\InterfaceType)|GraphQL\Type\Definition\InterfaceType>|string, isTypeOf?: (callable(mixed, mixed, GraphQL\Type\Definition\ResolveInfo): (bool|GraphQL\Deferred|null))|string|null, astNode?: GraphQL\Language\AST\ObjectTypeDefinitionNode|string|null, extensionASTNodes?: array<int, GraphQL\Language\AST\ObjectTypeExtensionNode>|string|null}.
Error: Parameter #2 $errors of class GraphQL\Executor\ExecutionResult constructor expects list<GraphQL\Error\Error>, non-empty-array<int, GraphQL\Error\Error> given.

Type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Misc. change (internal, infrastructure, maintenance, etc.)

Checklist:

  • Existing tests have been adapted and/or new tests have been added
  • Add a CHANGELOG.md entry
  • Update the README.md
  • Code style has been fixed via composer fix-style

Would be redundant if graphql-php would define it as list, but they
currently don't.
@mfn mfn self-assigned this Oct 7, 2024
@mfn mfn merged commit c87b733 into master Oct 7, 2024
34 checks passed
@mfn mfn deleted the mfn-phpstan branch October 7, 2024 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant