Skip to content

Commit

Permalink
[AdminListBundle] Change pagerfanta dependencies to require the minim…
Browse files Browse the repository at this point in the history
…um needed packages
  • Loading branch information
acrobat committed Mar 14, 2021
1 parent ad36a59 commit ad56f56
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 7 deletions.
10 changes: 10 additions & 0 deletions UPGRADE-5.8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
UPGRADE FROM 5.7 to 5.8
=======================

General
-------

If you still require the `kunstmaan/bundles-cms` package, update you `composer.json` to require `babdev/pagerfanta-bundle`
instead of `white-october/pagerfanta-bundle`. All specific bundle packages that use pagerfanta functionality are now requiring
the specifc pagerfanta packages. Newer skeleton installs will require the correct pagerfanta bundle package but old projects
or projects using the `white-october` package are encouraged to switch their dependencies.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"friendsofsymfony/user-bundle": "^2.0",
"knplabs/knp-menu-bundle": "^3.0",
"guzzlehttp/guzzle": "~6.1",
"white-october/pagerfanta-bundle": "~1.0",
"babdev/pagerfanta-bundle": "^2.4",
"kunstmaan/google-api-custom": "~1.0",
"gedmo/doctrine-extensions": "^2.4.34",
"doctrine/doctrine-fixtures-bundle": "^3.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Kunstmaan\AdminListBundle\AdminList\Filter;
use Kunstmaan\AdminListBundle\AdminList\FilterType\ORM\AbstractORMFilterType;
use Kunstmaan\AdminListBundle\AdminList\SortableInterface;
use Pagerfanta\Adapter\DoctrineORMAdapter;
use Pagerfanta\Doctrine\ORM\QueryAdapter as OrmQueryAdapter;
use Pagerfanta\Pagerfanta;
use Traversable;

Expand Down Expand Up @@ -92,7 +92,7 @@ public function getDeleteUrlFor($item)
public function getPagerfanta()
{
if (\is_null($this->pagerfanta)) {
$adapter = new DoctrineORMAdapter($this->getQuery());
$adapter = new OrmQueryAdapter($this->getQuery());
$this->pagerfanta = new Pagerfanta($adapter);
$this->pagerfanta->setNormalizeOutOfRangePages(true);
$this->pagerfanta->setMaxPerPage($this->getLimit());
Expand Down
5 changes: 4 additions & 1 deletion src/Kunstmaan/AdminListBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
],
"require": {
"php": "^7.2",
"box/spout": "^2.5",
"kunstmaan/admin-bundle": "^5.7",
"box/spout": "^2.5"
"pagerfanta/core": "^2.4",
"pagerfanta/doctrine-orm-adapter": "^2.4",
"pagerfanta/twig": "^2.4"
},
"require-dev": {
"matthiasnoback/symfony-config-test": "^4.0",
Expand Down
4 changes: 3 additions & 1 deletion src/Kunstmaan/ArticleBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"require": {
"php": "^7.2",
"kunstmaan/adminlist-bundle": "^5.2",
"kunstmaan/pagepart-bundle": "^5.2"
"kunstmaan/pagepart-bundle": "^5.2",
"pagerfanta/core": "^2.4",
"pagerfanta/twig": "^2.4"
},
"require-dev": {
"matthiasnoback/symfony-config-test": "^4.0",
Expand Down
3 changes: 2 additions & 1 deletion src/Kunstmaan/MediaBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"symfony/mime": "^4.4",
"imagine/imagine": "~0.6",
"knplabs/knp-gaufrette-bundle": "~0.1",
"kunstmaan/adminlist-bundle": "~5.2"
"kunstmaan/adminlist-bundle": "~5.2",
"pagerfanta/twig": "^2.4"
},
"require-dev": {
"matthiasnoback/symfony-config-test": "^4.0",
Expand Down
4 changes: 3 additions & 1 deletion src/Kunstmaan/NodeSearchBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"php": "^7.2",
"kunstmaan/admin-bundle": "^5.7",
"kunstmaan/pagepart-bundle": "~5.2",
"kunstmaan/search-bundle": "~5.2"
"kunstmaan/search-bundle": "~5.2",
"pagerfanta/core": "^2.4",
"pagerfanta/twig": "^2.4"
},
"require-dev": {
"matthiasnoback/symfony-config-test": "^4.0",
Expand Down

0 comments on commit ad56f56

Please sign in to comment.