Skip to content

Commit a93c0f6

Browse files
authored
fix(provider): legacy pagination injection (#4717)
1 parent b6d91f3 commit a93c0f6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Core/Bridge/Elasticsearch/DataProvider/CollectionDataProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
use ApiPlatform\Core\Bridge\Elasticsearch\Api\IdentifierExtractorInterface;
1717
use ApiPlatform\Core\DataProvider\ContextAwareCollectionDataProviderInterface;
18+
use ApiPlatform\Core\DataProvider\Pagination as LegacyPagination;
1819
use ApiPlatform\Core\DataProvider\RestrictedDataProviderInterface;
1920
use ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface;
2021
use ApiPlatform\Elasticsearch\Exception\IndexNotFoundException;
@@ -46,8 +47,9 @@ final class CollectionDataProvider implements ContextAwareCollectionDataProvider
4647
/**
4748
* @param RequestBodySearchCollectionExtensionInterface[] $collectionExtensions
4849
* @param ResourceMetadataFactoryInterface|ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory
50+
* @param Pagination|LegacyPagination $pagination
4951
*/
50-
public function __construct(Client $client, DocumentMetadataFactoryInterface $documentMetadataFactory, IdentifierExtractorInterface $identifierExtractor = null, DenormalizerInterface $denormalizer, Pagination $pagination, $resourceMetadataFactory, iterable $collectionExtensions = [])
52+
public function __construct(Client $client, DocumentMetadataFactoryInterface $documentMetadataFactory, IdentifierExtractorInterface $identifierExtractor = null, DenormalizerInterface $denormalizer, $pagination, $resourceMetadataFactory, iterable $collectionExtensions = [])
5153
{
5254
$this->client = $client;
5355
$this->documentMetadataFactory = $documentMetadataFactory;

0 commit comments

Comments
 (0)