Skip to content

Commit 891a2b9

Browse files
committed
⬆️ Upgrade dependency babdev/pagerfanta-bundle - issue #3551
1 parent 08074c8 commit 891a2b9

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"ext-pdo": "*",
1111
"composer-runtime-api": "^2",
1212
"api-platform/core": "^2.6",
13-
"babdev/pagerfanta-bundle": "^2.11",
13+
"babdev/pagerfanta-bundle": "^4.5",
1414
"beberlei/doctrineextensions": "^1.3",
1515
"bobdenotter/yaml-migrations": "^1.1.1",
1616
"bolt/common": "^3.0.5",
@@ -34,6 +34,7 @@
3434
"nelexa/zip": "^3.3 || ^4.0",
3535
"nelmio/cors-bundle": "^2.1",
3636
"nesbot/carbon": "^2.53",
37+
"pagerfanta/doctrine-orm-adapter": "^4.7",
3738
"php-translation/symfony-bundle": "^0.12",
3839
"phpdocumentor/reflection-docblock": "^5.3",
3940
"psr/event-dispatcher": "^1.0",

src/Repository/ContentRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use Doctrine\ORM\Query;
1414
use Doctrine\ORM\QueryBuilder;
1515
use Doctrine\Persistence\ManagerRegistry;
16-
use Pagerfanta\Adapter\DoctrineORMAdapter;
16+
use Pagerfanta\Doctrine\ORM\QueryAdapter;
1717
use Pagerfanta\Pagerfanta;
1818
use Tightenco\Collect\Support\Collection;
1919

@@ -212,7 +212,7 @@ public function findOneByFieldValue(string $fieldName, string $value, ?ContentTy
212212

213213
protected function createPaginator(Query $query, int $page, int $amountPerPage): Pagerfanta
214214
{
215-
$paginator = new Pagerfanta(new DoctrineORMAdapter($query, true, true));
215+
$paginator = new Pagerfanta(new QueryAdapter($query, true, true));
216216
$paginator->setMaxPerPage($amountPerPage);
217217
$paginator->setCurrentPage($page);
218218

src/Repository/LogRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Doctrine\ORM\Query;
1010
use Doctrine\ORM\QueryBuilder;
1111
use Doctrine\Persistence\ManagerRegistry;
12-
use Pagerfanta\Adapter\DoctrineORMAdapter;
12+
use Pagerfanta\Doctrine\ORM\QueryAdapter;
1313
use Pagerfanta\Pagerfanta;
1414

1515
/**
@@ -41,7 +41,7 @@ public function findLatest(int $page = 1, int $amount = 6): Pagerfanta
4141

4242
private function createPaginator(Query $query, int $page, int $amountPerPage): Pagerfanta
4343
{
44-
$paginator = new Pagerfanta(new DoctrineORMAdapter($query, true, true));
44+
$paginator = new Pagerfanta(new QueryAdapter($query, true, true));
4545
$paginator->setMaxPerPage($amountPerPage);
4646
$paginator->setCurrentPage($page);
4747

src/Storage/Handler/SelectQueryHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Bolt\Storage\Directive\PageDirective;
1111
use Bolt\Storage\SelectQuery;
1212
use Doctrine\ORM\Query;
13-
use Pagerfanta\Adapter\DoctrineORMAdapter;
13+
use Pagerfanta\Doctrine\ORM\QueryAdapter;
1414
use Pagerfanta\Pagerfanta;
1515
use Symfony\Component\HttpFoundation\Request;
1616

@@ -73,7 +73,7 @@ public function __invoke(ContentQueryParser $contentQuery)
7373

7474
private function createPaginator(?Request $request, Query $query, int $amountPerPage, ?int $page = null): Pagerfanta
7575
{
76-
$paginator = new Pagerfanta(new DoctrineORMAdapter($query, true, true));
76+
$paginator = new Pagerfanta(new QueryAdapter($query, true, true));
7777
$paginator->setMaxPerPage($amountPerPage);
7878

7979
// If current page was not set explicitly.

symfony.lock

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,6 @@
299299
"ondram/ci-detector": {
300300
"version": "3.5.1"
301301
},
302-
"pagerfanta/pagerfanta": {
303-
"version": "v2.3.0"
304-
},
305302
"phar-io/manifest": {
306303
"version": "1.0.3"
307304
},

0 commit comments

Comments
 (0)