From 838409ed56df84cff48f7309cd98cad6e0409b75 Mon Sep 17 00:00:00 2001 From: Sam Partington Date: Tue, 1 May 2018 12:11:14 +0100 Subject: [PATCH 1/4] Allow 1.x for Pagerfanta The latest 1.x release is https://github.com/whiteoctober/Pagerfanta/releases/tag/v1.1.0, which the previous constraint wouldn't have allowed. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3693696..9820dad 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ ], "require": { "php": ">=5.3", - "pagerfanta/pagerfanta": "1.0.*", + "pagerfanta/pagerfanta": "^1.0.0", "symfony/framework-bundle": "~2.3|~3.0|~4.0", "symfony/property-access": "~2.3|~3.0|~4.0", "symfony/twig-bundle": "~2.3|~3.0|~4.0" From b8410e910e1c55d2d318f79ff42d4eaf2427db74 Mon Sep 17 00:00:00 2001 From: Sam Partington Date: Tue, 8 May 2018 11:46:52 +0100 Subject: [PATCH 2/4] Allow 2.x for Pagerfanta See discussion at https://github.com/whiteoctober/WhiteOctoberPagerfantaBundle/pull/194 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9820dad..cb9c8f7 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ ], "require": { "php": ">=5.3", - "pagerfanta/pagerfanta": "^1.0.0", + "pagerfanta/pagerfanta": "^1.0.0|^2.0.0", "symfony/framework-bundle": "~2.3|~3.0|~4.0", "symfony/property-access": "~2.3|~3.0|~4.0", "symfony/twig-bundle": "~2.3|~3.0|~4.0" From 9ba3cdfa3f1b09a4ae99715e3d9db50c18c53134 Mon Sep 17 00:00:00 2001 From: Sam Partington Date: Thu, 17 May 2018 16:55:09 +0100 Subject: [PATCH 3/4] Update incorrect option name to use same as Pagerfanta >= 1.1.0 These changes were originally in https://github.com/whiteoctober/WhiteOctoberPagerfantaBundle/pull/189, but I've brought them across into this branch as they require Pagerfanta >= 1.1.0 --- Tests/View/DefaultTranslatedViewTest.php | 4 ++-- TestsProject/app/config_test.yml | 2 +- View/DefaultTranslatedView.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Tests/View/DefaultTranslatedViewTest.php b/Tests/View/DefaultTranslatedViewTest.php index ed78dfe..e6e6ebc 100644 --- a/Tests/View/DefaultTranslatedViewTest.php +++ b/Tests/View/DefaultTranslatedViewTest.php @@ -25,7 +25,7 @@ protected function translatedViewClass() protected function previousMessageOption() { - return 'previous_message'; + return 'prev_message'; } protected function nextMessageOption() @@ -47,4 +47,4 @@ protected function translatedViewName() { return 'default_translated'; } -} \ No newline at end of file +} diff --git a/TestsProject/app/config_test.yml b/TestsProject/app/config_test.yml index e59e02e..6408010 100644 --- a/TestsProject/app/config_test.yml +++ b/TestsProject/app/config_test.yml @@ -20,6 +20,6 @@ services: class: Pagerfanta\View\OptionableView arguments: - '@pagerfanta.view.default' - - { proximity: 2, previous_message: Anterior, next_message: Siguiente } + - { proximity: 2, prev_message: Anterior, next_message: Siguiente } public: false tags: [{ name: pagerfanta.view, alias: my_view_1 }] diff --git a/View/DefaultTranslatedView.php b/View/DefaultTranslatedView.php index 6880f75..2cd4735 100644 --- a/View/DefaultTranslatedView.php +++ b/View/DefaultTranslatedView.php @@ -22,7 +22,7 @@ class DefaultTranslatedView extends TranslatedView { protected function previousMessageOption() { - return 'previous_message'; + return 'prev_message'; } protected function nextMessageOption() From c16f6a8f33d2f029d978a64884ff253352a919e0 Mon Sep 17 00:00:00 2001 From: Sam Partington Date: Thu, 17 May 2018 17:23:18 +0100 Subject: [PATCH 4/4] Don't allow Pagerfanta < 1.1.0 The reason for this is that older versions of Pagerfanta still (incorrectly) use the option previous_message rather than prev_message in the Default template (https://github.com/whiteoctober/Pagerfanta/pull/230), but this branch now uses prev_message everywhere. In order to keep the two in-step, we need to ensure that this code is running against Pagerfanta >= 1.1.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index cb9c8f7..3ff0200 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ ], "require": { "php": ">=5.3", - "pagerfanta/pagerfanta": "^1.0.0|^2.0.0", + "pagerfanta/pagerfanta": "^1.1.0|^2.0.0", "symfony/framework-bundle": "~2.3|~3.0|~4.0", "symfony/property-access": "~2.3|~3.0|~4.0", "symfony/twig-bundle": "~2.3|~3.0|~4.0"