From ecc4aa12f935f47c73cba982e82b272909908c27 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Thu, 4 Dec 2025 09:02:26 +0100 Subject: [PATCH 1/6] Add phpdoc for array --- phpstan.neon.dist | 16 ++++++++++++++++ .../DefinitionNameFactoryInterface.php | 3 ++- src/JsonSchema/SchemaFactoryInterface.php | 2 ++ .../Exception/HttpExceptionInterface.php | 2 ++ .../Extractor/PropertyExtractorInterface.php | 2 ++ src/Metadata/UriVariableTransformerInterface.php | 12 ++++++------ src/Metadata/UriVariablesConverterInterface.php | 7 ++++--- src/Serializer/Filter/FilterInterface.php | 5 +++++ src/State/SerializerContextBuilderInterface.php | 2 ++ ...ropertySchemaRestrictionMetadataInterface.php | 2 +- src/Validator/ValidatorInterface.php | 2 ++ 11 files changed, 44 insertions(+), 11 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 5eb2ef1279a..e233446166d 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -106,6 +106,22 @@ parameters: # Level 6 - identifier: missingType.iterableValue + paths: + - src/Doctrine/Common/Tests + - src/Doctrine/Odm/Tests + - src/Doctrine/Orm/Tests + - src/Elasticsearch/Tests + - src/GraphQl/Tests + - src/Hydra/Tests + - src/JsonApi/Tests + - src/JsonSchema/Tests + - src/Metadata/Tests + - src/OpenApi/Tests + - src/Serializer/Tests + - src/State/Tests + - src/Symfony/Tests + - tests + - src # TODO - identifier: missingType.generics - diff --git a/src/JsonSchema/DefinitionNameFactoryInterface.php b/src/JsonSchema/DefinitionNameFactoryInterface.php index 26de6f1d3f1..012ea841a6a 100644 --- a/src/JsonSchema/DefinitionNameFactoryInterface.php +++ b/src/JsonSchema/DefinitionNameFactoryInterface.php @@ -25,7 +25,8 @@ interface DefinitionNameFactoryInterface /** * Creates a resource definition name. * - * @param class-string $className + * @param class-string $className + * @param array $serializerContext * * @return string the definition name */ diff --git a/src/JsonSchema/SchemaFactoryInterface.php b/src/JsonSchema/SchemaFactoryInterface.php index 64b270764a6..bd598ab4796 100644 --- a/src/JsonSchema/SchemaFactoryInterface.php +++ b/src/JsonSchema/SchemaFactoryInterface.php @@ -26,6 +26,8 @@ interface SchemaFactoryInterface /** * Builds the JSON Schema document corresponding to the given PHP class. + * + * @param array|null $serializerContext */ public function buildSchema(string $className, string $format = 'json', string $type = Schema::TYPE_OUTPUT, ?Operation $operation = null, ?Schema $schema = null, ?array $serializerContext = null, bool $forceCollection = false): Schema; } diff --git a/src/Metadata/Exception/HttpExceptionInterface.php b/src/Metadata/Exception/HttpExceptionInterface.php index 45a9905fb09..7d9a00325c4 100644 --- a/src/Metadata/Exception/HttpExceptionInterface.php +++ b/src/Metadata/Exception/HttpExceptionInterface.php @@ -22,6 +22,8 @@ public function getStatusCode(): int; /** * Returns response headers. + * + * @return array */ public function getHeaders(): array; } diff --git a/src/Metadata/Extractor/PropertyExtractorInterface.php b/src/Metadata/Extractor/PropertyExtractorInterface.php index 8930c78efc4..863a9bca771 100644 --- a/src/Metadata/Extractor/PropertyExtractorInterface.php +++ b/src/Metadata/Extractor/PropertyExtractorInterface.php @@ -26,6 +26,8 @@ interface PropertyExtractorInterface * Parses all metadata files and convert them in an array. * * @throws InvalidArgumentException + * + * @return array>> */ public function getProperties(): array; } diff --git a/src/Metadata/UriVariableTransformerInterface.php b/src/Metadata/UriVariableTransformerInterface.php index b9f9476065b..889a6cdb371 100644 --- a/src/Metadata/UriVariableTransformerInterface.php +++ b/src/Metadata/UriVariableTransformerInterface.php @@ -20,9 +20,9 @@ interface UriVariableTransformerInterface /** * Transforms the value of a URI variable (identifier) to its type. * - * @param mixed $value The URI variable value to transform - * @param array $types The guessed type behind the URI variable - * @param array $context Options available to the transformer + * @param mixed $value The URI variable value to transform + * @param array $types The guessed type behind the URI variable + * @param array $context Options available to the transformer * * @throws InvalidUriVariableException Occurs when the URI variable could not be transformed * @@ -33,9 +33,9 @@ public function transform(mixed $value, array $types, array $context = []); /** * Checks whether the value of a URI variable can be transformed to its type by this transformer. * - * @param mixed $value The URI variable value to transform - * @param array $types The types to which the URI variable value should be transformed - * @param array $context Options available to the transformer + * @param mixed $value The URI variable value to transform + * @param array $types The types to which the URI variable value should be transformed + * @param array $context Options available to the transformer */ public function supportsTransformation(mixed $value, array $types, array $context = []): bool; } diff --git a/src/Metadata/UriVariablesConverterInterface.php b/src/Metadata/UriVariablesConverterInterface.php index 344de031994..575ffe9503a 100644 --- a/src/Metadata/UriVariablesConverterInterface.php +++ b/src/Metadata/UriVariablesConverterInterface.php @@ -26,13 +26,14 @@ interface UriVariablesConverterInterface /** * Takes an array of strings representing URI variables (identifiers) and transform their values to the expected type. * - * @param array $data URI variables to convert to PHP values - * @param string $class The class to which the URI variables belong to + * @param array $data URI variables to convert to PHP values + * @param string $class The class to which the URI variables belong to + * @param array $context * * @throws InvalidIdentifierException * @throws InvalidUriVariableException * - * @return array Array indexed by identifiers properties with their values denormalized + * @return array Array indexed by identifiers properties with their values denormalized */ public function convert(array $data, string $class, array $context = []): array; } diff --git a/src/Serializer/Filter/FilterInterface.php b/src/Serializer/Filter/FilterInterface.php index 22868870e4b..07e21dae390 100644 --- a/src/Serializer/Filter/FilterInterface.php +++ b/src/Serializer/Filter/FilterInterface.php @@ -25,6 +25,11 @@ interface FilterInterface extends BaseFilterInterface { /** * Apply a filter to the serializer context. + * + * @param array $attributes + * @param array $context + * + * @param-out array $context */ public function apply(Request $request, bool $normalization, array $attributes, array &$context): void; } diff --git a/src/State/SerializerContextBuilderInterface.php b/src/State/SerializerContextBuilderInterface.php index 1b2c79164ae..99247373712 100644 --- a/src/State/SerializerContextBuilderInterface.php +++ b/src/State/SerializerContextBuilderInterface.php @@ -30,6 +30,8 @@ interface SerializerContextBuilderInterface /** * Creates a serialization context from a Request. * + * @param array|null $extractedAttributes + * * @throws RuntimeException * * @return array diff --git a/src/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaRestrictionMetadataInterface.php b/src/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaRestrictionMetadataInterface.php index 1e087ec2928..75f5e6e7829 100644 --- a/src/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaRestrictionMetadataInterface.php +++ b/src/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaRestrictionMetadataInterface.php @@ -31,7 +31,7 @@ interface PropertySchemaRestrictionMetadataInterface * @param Constraint $constraint The validation constraint * @param ApiProperty $propertyMetadata The property metadata * - * @return array The array of restrictions + * @return array The array of restrictions */ public function create(Constraint $constraint, ApiProperty $propertyMetadata): array; diff --git a/src/Validator/ValidatorInterface.php b/src/Validator/ValidatorInterface.php index 323d0f5d67d..874acae599b 100644 --- a/src/Validator/ValidatorInterface.php +++ b/src/Validator/ValidatorInterface.php @@ -25,6 +25,8 @@ interface ValidatorInterface /** * Validates an item. * + * @param array $context + * * @throws ValidationException */ public function validate(object $data, array $context = []): void; From 584b38165cc1d24718065f9aafbf1b4a02504d0c Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 10 Jan 2026 15:10:02 +0100 Subject: [PATCH 2/6] Try --- phpstan.neon.dist | 1 - 1 file changed, 1 deletion(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index e233446166d..b947f0d140f 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -121,7 +121,6 @@ parameters: - src/State/Tests - src/Symfony/Tests - tests - - src # TODO - identifier: missingType.generics - From 28c2f5d24b94788a29d641fda30ca2e26b9dca9c Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 10 Jan 2026 15:40:51 +0100 Subject: [PATCH 3/6] Solve more --- phpstan.neon.dist | 1 + src/Doctrine/Common/Filter/PropertyAwareFilterInterface.php | 2 +- .../Extension/AggregationCollectionExtensionInterface.php | 3 +++ .../Odm/Extension/AggregationItemExtensionInterface.php | 3 +++ .../AggregationResultCollectionExtensionInterface.php | 6 ++++++ .../Extension/AggregationResultItemExtensionInterface.php | 6 ++++++ .../Extension/QueryResultCollectionExtensionInterface.php | 6 ++++++ .../Orm/Extension/QueryResultItemExtensionInterface.php | 6 ++++++ .../RequestBodySearchCollectionExtensionInterface.php | 3 +++ src/Elasticsearch/Filter/FilterInterface.php | 3 +++ src/GraphQl/Resolver/MutationResolverInterface.php | 3 +++ src/GraphQl/Resolver/QueryCollectionResolverInterface.php | 3 ++- src/GraphQl/Resolver/QueryItemResolverInterface.php | 3 +++ .../Serializer/SerializerContextBuilderInterface.php | 5 +++++ .../OperationAwareSubscriptionManagerInterface.php | 3 +++ src/GraphQl/Subscription/SubscriptionManagerInterface.php | 3 +++ src/HttpCache/PurgerInterface.php | 2 ++ src/JsonLd/AnonymousContextBuilderInterface.php | 2 ++ 18 files changed, 61 insertions(+), 2 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index b947f0d140f..9082d3b39d6 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -112,6 +112,7 @@ parameters: - src/Doctrine/Orm/Tests - src/Elasticsearch/Tests - src/GraphQl/Tests + - src/HttpCache/Tests - src/Hydra/Tests - src/JsonApi/Tests - src/JsonSchema/Tests diff --git a/src/Doctrine/Common/Filter/PropertyAwareFilterInterface.php b/src/Doctrine/Common/Filter/PropertyAwareFilterInterface.php index 4180765bfa3..33b9fad001a 100644 --- a/src/Doctrine/Common/Filter/PropertyAwareFilterInterface.php +++ b/src/Doctrine/Common/Filter/PropertyAwareFilterInterface.php @@ -18,7 +18,7 @@ * * @author Antoine Bluchet * - * @method ?array getProperties() + * @method array|null getProperties() * * @experimental */ diff --git a/src/Doctrine/Odm/Extension/AggregationCollectionExtensionInterface.php b/src/Doctrine/Odm/Extension/AggregationCollectionExtensionInterface.php index a754e8b809f..833235c310b 100644 --- a/src/Doctrine/Odm/Extension/AggregationCollectionExtensionInterface.php +++ b/src/Doctrine/Odm/Extension/AggregationCollectionExtensionInterface.php @@ -23,5 +23,8 @@ */ interface AggregationCollectionExtensionInterface { + /** + * @param array $context + */ public function applyToCollection(Builder $aggregationBuilder, string $resourceClass, ?Operation $operation = null, array &$context = []): void; } diff --git a/src/Doctrine/Odm/Extension/AggregationItemExtensionInterface.php b/src/Doctrine/Odm/Extension/AggregationItemExtensionInterface.php index 492b7114c60..41499bfe843 100644 --- a/src/Doctrine/Odm/Extension/AggregationItemExtensionInterface.php +++ b/src/Doctrine/Odm/Extension/AggregationItemExtensionInterface.php @@ -23,5 +23,8 @@ */ interface AggregationItemExtensionInterface { + /** + * @param array $context + */ public function applyToItem(Builder $aggregationBuilder, string $resourceClass, array $identifiers, ?Operation $operation = null, array &$context = []): void; } diff --git a/src/Doctrine/Odm/Extension/AggregationResultCollectionExtensionInterface.php b/src/Doctrine/Odm/Extension/AggregationResultCollectionExtensionInterface.php index 839242b4704..ffa5d80ffc5 100644 --- a/src/Doctrine/Odm/Extension/AggregationResultCollectionExtensionInterface.php +++ b/src/Doctrine/Odm/Extension/AggregationResultCollectionExtensionInterface.php @@ -24,7 +24,13 @@ */ interface AggregationResultCollectionExtensionInterface extends AggregationCollectionExtensionInterface { + /** + * @param array $context + */ public function supportsResult(string $resourceClass, ?Operation $operation = null, array $context = []): bool; + /** + * @param array $context + */ public function getResult(Builder $aggregationBuilder, string $resourceClass, ?Operation $operation = null, array $context = []): iterable; } diff --git a/src/Doctrine/Odm/Extension/AggregationResultItemExtensionInterface.php b/src/Doctrine/Odm/Extension/AggregationResultItemExtensionInterface.php index 103d1d0b4a5..2a5beff3ff3 100644 --- a/src/Doctrine/Odm/Extension/AggregationResultItemExtensionInterface.php +++ b/src/Doctrine/Odm/Extension/AggregationResultItemExtensionInterface.php @@ -24,7 +24,13 @@ */ interface AggregationResultItemExtensionInterface extends AggregationItemExtensionInterface { + /** + * @param array $context + */ public function supportsResult(string $resourceClass, ?Operation $operation = null, array $context = []): bool; + /** + * @param array $context + */ public function getResult(Builder $aggregationBuilder, string $resourceClass, ?Operation $operation = null, array $context = []): ?object; } diff --git a/src/Doctrine/Orm/Extension/QueryResultCollectionExtensionInterface.php b/src/Doctrine/Orm/Extension/QueryResultCollectionExtensionInterface.php index fe996d29d5b..0d588032939 100644 --- a/src/Doctrine/Orm/Extension/QueryResultCollectionExtensionInterface.php +++ b/src/Doctrine/Orm/Extension/QueryResultCollectionExtensionInterface.php @@ -27,7 +27,13 @@ */ interface QueryResultCollectionExtensionInterface extends QueryCollectionExtensionInterface { + /** + * @param array $context + */ public function supportsResult(string $resourceClass, ?Operation $operation = null, array $context = []): bool; + /** + * @param array $context + */ public function getResult(QueryBuilder $queryBuilder, ?string $resourceClass = null, ?Operation $operation = null, array $context = []): iterable; } diff --git a/src/Doctrine/Orm/Extension/QueryResultItemExtensionInterface.php b/src/Doctrine/Orm/Extension/QueryResultItemExtensionInterface.php index 4c23d77522b..e46fddf5611 100644 --- a/src/Doctrine/Orm/Extension/QueryResultItemExtensionInterface.php +++ b/src/Doctrine/Orm/Extension/QueryResultItemExtensionInterface.php @@ -26,7 +26,13 @@ */ interface QueryResultItemExtensionInterface extends QueryItemExtensionInterface { + /** + * @param array $context + */ public function supportsResult(string $resourceClass, ?Operation $operation = null, array $context = []): bool; + /** + * @param array $context + */ public function getResult(QueryBuilder $queryBuilder, ?string $resourceClass = null, ?Operation $operation = null, array $context = []): ?object; } diff --git a/src/Elasticsearch/Extension/RequestBodySearchCollectionExtensionInterface.php b/src/Elasticsearch/Extension/RequestBodySearchCollectionExtensionInterface.php index 3e9ece3fc49..5556a16ca98 100644 --- a/src/Elasticsearch/Extension/RequestBodySearchCollectionExtensionInterface.php +++ b/src/Elasticsearch/Extension/RequestBodySearchCollectionExtensionInterface.php @@ -26,5 +26,8 @@ */ interface RequestBodySearchCollectionExtensionInterface { + /** + * @param array $context + */ public function applyToCollection(array $requestBody, string $resourceClass, ?Operation $operation = null, array $context = []): array; } diff --git a/src/Elasticsearch/Filter/FilterInterface.php b/src/Elasticsearch/Filter/FilterInterface.php index 7eda4bac771..13d4df2a0b1 100644 --- a/src/Elasticsearch/Filter/FilterInterface.php +++ b/src/Elasticsearch/Filter/FilterInterface.php @@ -25,5 +25,8 @@ */ interface FilterInterface extends BaseFilterInterface { + /** + * @param array $context + */ public function apply(array $clauseBody, string $resourceClass, ?Operation $operation = null, array $context = []): array; } diff --git a/src/GraphQl/Resolver/MutationResolverInterface.php b/src/GraphQl/Resolver/MutationResolverInterface.php index 285147a4b35..ddaa599a426 100644 --- a/src/GraphQl/Resolver/MutationResolverInterface.php +++ b/src/GraphQl/Resolver/MutationResolverInterface.php @@ -20,5 +20,8 @@ */ interface MutationResolverInterface { + /** + * @param array $context + */ public function __invoke(?object $item, array $context): ?object; } diff --git a/src/GraphQl/Resolver/QueryCollectionResolverInterface.php b/src/GraphQl/Resolver/QueryCollectionResolverInterface.php index fbdd048d039..4d1980cbb73 100644 --- a/src/GraphQl/Resolver/QueryCollectionResolverInterface.php +++ b/src/GraphQl/Resolver/QueryCollectionResolverInterface.php @@ -21,7 +21,8 @@ interface QueryCollectionResolverInterface { /** - * @param iterable $collection + * @param iterable $collection + * @param array $context * * @return iterable */ diff --git a/src/GraphQl/Resolver/QueryItemResolverInterface.php b/src/GraphQl/Resolver/QueryItemResolverInterface.php index 205134e8f89..8a3d9c7747a 100644 --- a/src/GraphQl/Resolver/QueryItemResolverInterface.php +++ b/src/GraphQl/Resolver/QueryItemResolverInterface.php @@ -20,5 +20,8 @@ */ interface QueryItemResolverInterface { + /** + * @param array $context + */ public function __invoke(?object $item, array $context): object; } diff --git a/src/GraphQl/Serializer/SerializerContextBuilderInterface.php b/src/GraphQl/Serializer/SerializerContextBuilderInterface.php index 1ec210b1aa9..8f525266e3f 100644 --- a/src/GraphQl/Serializer/SerializerContextBuilderInterface.php +++ b/src/GraphQl/Serializer/SerializerContextBuilderInterface.php @@ -22,5 +22,10 @@ */ interface SerializerContextBuilderInterface { + /** + * @param array $resolverContext + * + * @return array + */ public function create(string $resourceClass, Operation $operation, array $resolverContext, bool $normalization): array; } diff --git a/src/GraphQl/Subscription/OperationAwareSubscriptionManagerInterface.php b/src/GraphQl/Subscription/OperationAwareSubscriptionManagerInterface.php index 621e304ebc0..fd235dac21b 100644 --- a/src/GraphQl/Subscription/OperationAwareSubscriptionManagerInterface.php +++ b/src/GraphQl/Subscription/OperationAwareSubscriptionManagerInterface.php @@ -22,5 +22,8 @@ */ interface OperationAwareSubscriptionManagerInterface extends SubscriptionManagerInterface { + /** + * @param array $context + */ public function retrieveSubscriptionId(array $context, ?array $result, ?Operation $operation = null): ?string; } diff --git a/src/GraphQl/Subscription/SubscriptionManagerInterface.php b/src/GraphQl/Subscription/SubscriptionManagerInterface.php index 4064f068010..e04003e9e42 100644 --- a/src/GraphQl/Subscription/SubscriptionManagerInterface.php +++ b/src/GraphQl/Subscription/SubscriptionManagerInterface.php @@ -20,6 +20,9 @@ */ interface SubscriptionManagerInterface { + /** + * @param array $context + */ public function retrieveSubscriptionId(array $context, ?array $result): ?string; public function getPushPayloads(object $object): array; diff --git a/src/HttpCache/PurgerInterface.php b/src/HttpCache/PurgerInterface.php index 6b5571257cb..b47127bf64c 100644 --- a/src/HttpCache/PurgerInterface.php +++ b/src/HttpCache/PurgerInterface.php @@ -31,6 +31,8 @@ public function purge(array $iris): void; * Get the response header containing purged tags. * * @param string[] $iris + * + * @return array */ public function getResponseHeaders(array $iris): array; } diff --git a/src/JsonLd/AnonymousContextBuilderInterface.php b/src/JsonLd/AnonymousContextBuilderInterface.php index cf9fae7e667..2a70cea8d35 100644 --- a/src/JsonLd/AnonymousContextBuilderInterface.php +++ b/src/JsonLd/AnonymousContextBuilderInterface.php @@ -25,6 +25,8 @@ interface AnonymousContextBuilderInterface extends ContextBuilderInterface /** * Creates a JSON-LD context based on the given object. * Usually this is used with an Input or Output DTO object. + * + * @param array $context */ public function getAnonymousResourceContext(object $object, array $context = [], int $referenceType = UrlGeneratorInterface::ABS_PATH): array; } From 5b4572ed7889e50c413f21ac88449f883dc47a29 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 10 Jan 2026 15:47:51 +0100 Subject: [PATCH 4/6] Temporary ignore src --- phpstan.neon.dist | 1 + 1 file changed, 1 insertion(+) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 9082d3b39d6..158b5cd9678 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -122,6 +122,7 @@ parameters: - src/State/Tests - src/Symfony/Tests - tests + - src # TODO - identifier: missingType.generics - From f6db5f2a2d6517f68d8c69f21ff8ba8e26299df8 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 10 Jan 2026 15:54:54 +0100 Subject: [PATCH 5/6] Fix --- .../Odm/Extension/AggregationCollectionExtensionInterface.php | 2 ++ .../Odm/Extension/AggregationItemExtensionInterface.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Doctrine/Odm/Extension/AggregationCollectionExtensionInterface.php b/src/Doctrine/Odm/Extension/AggregationCollectionExtensionInterface.php index 833235c310b..78a44186d85 100644 --- a/src/Doctrine/Odm/Extension/AggregationCollectionExtensionInterface.php +++ b/src/Doctrine/Odm/Extension/AggregationCollectionExtensionInterface.php @@ -25,6 +25,8 @@ interface AggregationCollectionExtensionInterface { /** * @param array $context + * + * @param-out array $context */ public function applyToCollection(Builder $aggregationBuilder, string $resourceClass, ?Operation $operation = null, array &$context = []): void; } diff --git a/src/Doctrine/Odm/Extension/AggregationItemExtensionInterface.php b/src/Doctrine/Odm/Extension/AggregationItemExtensionInterface.php index 41499bfe843..04d3522e89b 100644 --- a/src/Doctrine/Odm/Extension/AggregationItemExtensionInterface.php +++ b/src/Doctrine/Odm/Extension/AggregationItemExtensionInterface.php @@ -25,6 +25,8 @@ interface AggregationItemExtensionInterface { /** * @param array $context + * + * @param-out array $context */ public function applyToItem(Builder $aggregationBuilder, string $resourceClass, array $identifiers, ?Operation $operation = null, array &$context = []): void; } From fbc9c784b9ae6d1827632a330846ac136287e2f5 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 10 Jan 2026 16:08:34 +0100 Subject: [PATCH 6/6] Fix --- src/Doctrine/Odm/Extension/PaginationExtension.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Doctrine/Odm/Extension/PaginationExtension.php b/src/Doctrine/Odm/Extension/PaginationExtension.php index c1d832ab32c..ee9f9f6099e 100644 --- a/src/Doctrine/Odm/Extension/PaginationExtension.php +++ b/src/Doctrine/Odm/Extension/PaginationExtension.php @@ -125,6 +125,11 @@ public function getResult(Builder $aggregationBuilder, string $resourceClass, ?O return new Paginator($iterator, $manager->getUnitOfWork(), $resourceClass); } + /** + * @param array $context + * + * @return array + */ private function addCountToContext(Builder $aggregationBuilder, array $context): array { if (!($context['graphql_operation_name'] ?? false)) {