Merge pull request #6145 from wallabag/fix/update-pagerfanta

This commit is contained in:
Jérémy Benoist 2022-12-16 14:35:46 +01:00 committed by GitHub
commit a8916425ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 165 additions and 107 deletions

View file

@ -278,3 +278,13 @@ services:
Wallabag\ImportBundle\Import\ChromeImport: Wallabag\ImportBundle\Import\ChromeImport:
tags: tags:
- { name: wallabag_import.import, alias: chrome } - { name: wallabag_import.import, alias: chrome }
# to factorize the proximity and bypass translation for prev & next
pagerfanta.view.default_wallabag:
class: Pagerfanta\View\OptionableView
arguments:
- '@pagerfanta.view.twitter_bootstrap'
- { proximity: 1, prev_message: "<", next_message: ">" }
public: false
tags:
- { name: pagerfanta.view, alias: default_wallabag }

View file

@ -51,7 +51,7 @@
"ext-tidy": "*", "ext-tidy": "*",
"ext-tokenizer": "*", "ext-tokenizer": "*",
"ext-xml": "*", "ext-xml": "*",
"babdev/pagerfanta-bundle": "^2.5", "babdev/pagerfanta-bundle": "^3.7",
"bdunogier/guzzle-site-authenticator": "^1.0.0", "bdunogier/guzzle-site-authenticator": "^1.0.0",
"craue/config-bundle": "^2.3.0", "craue/config-bundle": "^2.3.0",
"defuse/php-encryption": "^2.1", "defuse/php-encryption": "^2.1",
@ -89,7 +89,8 @@
"nelmio/api-doc-bundle": "^3.0", "nelmio/api-doc-bundle": "^3.0",
"nelmio/cors-bundle": "~2.2", "nelmio/cors-bundle": "~2.2",
"ocramius/proxy-manager": "^2.1.1", "ocramius/proxy-manager": "^2.1.1",
"pagerfanta/pagerfanta": "^2.4", "pagerfanta/doctrine-orm-adapter": "^3.7",
"pagerfanta/twig": "^3.7",
"php-amqplib/php-amqplib": "^3.4", "php-amqplib/php-amqplib": "^3.4",
"php-amqplib/rabbitmq-bundle": "^2.11", "php-amqplib/rabbitmq-bundle": "^2.11",
"php-http/client-common": "^2.4", "php-http/client-common": "^2.4",

247
composer.lock generated
View file

@ -4,68 +4,68 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "26ce7a6163724bda67e7ea39fa237bd5", "content-hash": "158ed59536ca89df79f9fdca18270c92",
"packages": [ "packages": [
{ {
"name": "babdev/pagerfanta-bundle", "name": "babdev/pagerfanta-bundle",
"version": "v2.11.0", "version": "v3.7.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/BabDev/PagerfantaBundle.git", "url": "https://github.com/BabDev/PagerfantaBundle.git",
"reference": "98bd0756de82080ace1a2e41e66f618e469da943" "reference": "d2760ebc3d22db10f219544323bea432dedc9eb0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/BabDev/PagerfantaBundle/zipball/98bd0756de82080ace1a2e41e66f618e469da943", "url": "https://api.github.com/repos/BabDev/PagerfantaBundle/zipball/d2760ebc3d22db10f219544323bea432dedc9eb0",
"reference": "98bd0756de82080ace1a2e41e66f618e469da943", "reference": "d2760ebc3d22db10f219544323bea432dedc9eb0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"pagerfanta/pagerfanta": "^2.7", "pagerfanta/core": "^3.1",
"php": "^7.2 || ^8.0", "php": "^7.4 || ^8.0",
"symfony/config": "^3.4 || ^4.4 || ^5.3", "symfony/config": "^4.4 || ^5.4 || ^6.0",
"symfony/dependency-injection": "^3.4 || ^4.4 || ^5.3", "symfony/dependency-injection": "^4.4 || ^5.4 || ^6.0",
"symfony/deprecation-contracts": "^2.1", "symfony/deprecation-contracts": "^2.1 || ^3.0",
"symfony/http-foundation": "^3.4 || ^4.4 || ^5.3", "symfony/http-foundation": "^4.4 || ^5.4 || ^6.0",
"symfony/http-kernel": "^3.4 || ^4.4 || ^5.3", "symfony/http-kernel": "^4.4 || ^5.4 || ^6.0",
"symfony/property-access": "^3.4 || ^4.4 || ^5.3", "symfony/polyfill-php80": "^1.15",
"symfony/routing": "^3.4 || ^4.4 || ^5.3" "symfony/property-access": "^4.4 || ^5.4 || ^6.0",
"symfony/routing": "^4.4 || ^5.4 || ^6.0"
}, },
"conflict": { "conflict": {
"pagerfanta/twig": "<3.1",
"twig/twig": "<1.35 || >=2.0,<2.5", "twig/twig": "<1.35 || >=2.0,<2.5",
"white-october/pagerfanta-bundle": "*" "white-october/pagerfanta-bundle": "*"
}, },
"require-dev": { "require-dev": {
"doctrine/annotations": "^1.8", "doctrine/annotations": "^1.8",
"jms/serializer": "^3.0", "jms/serializer": "^3.0",
"jms/serializer-bundle": "^3.0", "jms/serializer-bundle": "^3.0 || ^4.0",
"matthiasnoback/symfony-dependency-injection-test": "^4.1", "matthiasnoback/symfony-dependency-injection-test": "^4.3",
"pagerfanta/twig": "^3.1",
"phpstan/extension-installer": "^1.1", "phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^0.12.94", "phpstan/phpstan": "1.7.2",
"phpstan/phpstan-phpunit": "^0.12.21", "phpstan/phpstan-phpunit": "1.1.1",
"phpstan/phpstan-symfony": "^0.12.41", "phpstan/phpstan-symfony": "1.2.0",
"phpunit/phpunit": "^8.5 || ^9.3", "phpunit/phpunit": "^9.5",
"symfony/phpunit-bridge": "^4.4 || ^5.3", "symfony/phpunit-bridge": "^5.4 || ^6.0",
"symfony/serializer": "^3.4 || ^4.4 || ^5.3", "symfony/serializer": "^4.4 || ^5.4 || ^6.0",
"symfony/translation": "^3.4 || ^4.4 || ^5.3", "symfony/translation": "^4.4 || ^5.4 || ^6.0",
"symfony/twig-bridge": "^3.4 || ^4.4 || ^5.3", "symfony/twig-bridge": "^4.4 || ^5.4 || ^6.0",
"symfony/twig-bundle": "^3.4 || ^4.4 || ^5.3", "symfony/twig-bundle": "^4.4 || ^5.4 || ^6.0",
"twig/twig": "^1.35 || ^2.5 || ^3.0" "twig/twig": "^1.35 || ^2.5 || ^3.0"
}, },
"suggest": { "suggest": {
"jms/serializer-bundle": "To use the Pagerfanta class with the JMS Serializer", "jms/serializer-bundle": "To use the Pagerfanta class with the JMS Serializer",
"symfony/serializer": "To use the Pagerfanta class with the Symfony Serializer", "symfony/serializer": "To use the Pagerfanta class with the Symfony Serializer",
"symfony/translation": "To use the Pagerfanta views with translation support", "symfony/translation": "To use the Twig templates with translation support",
"twig/twig": "To integrate Pagerfanta with Twig through extensions" "twig/twig": "To integrate Pagerfanta with Twig through extensions"
}, },
"type": "symfony-bundle", "type": "symfony-bundle",
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"BabDev\\PagerfantaBundle\\": "" "BabDev\\PagerfantaBundle\\": "src/"
}, }
"exclude-from-classmap": [
"Tests/"
]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
@ -79,7 +79,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/BabDev/PagerfantaBundle/issues", "issues": "https://github.com/BabDev/PagerfantaBundle/issues",
"source": "https://github.com/BabDev/PagerfantaBundle/tree/v2.11.0" "source": "https://github.com/BabDev/PagerfantaBundle/tree/v3.7.0"
}, },
"funding": [ "funding": [
{ {
@ -87,7 +87,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2021-08-01T16:42:35+00:00" "time": "2022-05-27T20:58:26+00:00"
}, },
{ {
"name": "bacon/bacon-qr-code", "name": "bacon/bacon-qr-code",
@ -6322,100 +6322,147 @@
"time": "2021-12-01T09:34:27+00:00" "time": "2021-12-01T09:34:27+00:00"
}, },
{ {
"name": "pagerfanta/pagerfanta", "name": "pagerfanta/core",
"version": "v2.7.3", "version": "v3.7.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/BabDev/Pagerfanta.git", "url": "https://github.com/Pagerfanta/core.git",
"reference": "5f2aa1f1c9d1a6520f459e84b63e2bc25e9eea5b" "reference": "53c0bfdffc18fb816ae5c08e4bdda0773651bacc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/BabDev/Pagerfanta/zipball/5f2aa1f1c9d1a6520f459e84b63e2bc25e9eea5b", "url": "https://api.github.com/repos/Pagerfanta/core/zipball/53c0bfdffc18fb816ae5c08e4bdda0773651bacc",
"reference": "5f2aa1f1c9d1a6520f459e84b63e2bc25e9eea5b", "reference": "53c0bfdffc18fb816ae5c08e4bdda0773651bacc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
"php": "^7.2 || ^8.0", "php": "^7.4 || ^8.0",
"symfony/deprecation-contracts": "^2.1", "symfony/deprecation-contracts": "^2.1 || ^3.0",
"symfony/polyfill-php80": "^1.15" "symfony/polyfill-php80": "^1.15"
}, },
"conflict": {
"twig/twig": "<1.35 || >=2.0,<2.5"
},
"replace": {
"pagerfanta/core": "self.version",
"pagerfanta/doctrine-collections-adapter": "self.version",
"pagerfanta/doctrine-dbal-adapter": "self.version",
"pagerfanta/doctrine-mongodb-odm-adapter": "self.version",
"pagerfanta/doctrine-orm-adapter": "self.version",
"pagerfanta/doctrine-phpcr-odm-adapter": "self.version",
"pagerfanta/elastica-adapter": "self.version",
"pagerfanta/solarium-adapter": "self.version",
"pagerfanta/twig": "self.version"
},
"require-dev": { "require-dev": {
"dg/bypass-finals": "^1.3.1", "phpunit/phpunit": "^9.5",
"doctrine/cache": "^1.11 || ^2.0", "symfony/phpunit-bridge": "^5.4 || ^6.0"
"doctrine/collections": "^1.4",
"doctrine/dbal": "^2.5 || ^3.0",
"doctrine/orm": "^2.5",
"doctrine/phpcr-odm": "^1.3",
"friendsofphp/php-cs-fixer": "^3.0",
"jackalope/jackalope-doctrine-dbal": "^1.3",
"mandango/mandango": "^1.0@dev",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^0.12.93",
"phpstan/phpstan-phpunit": "^0.12.21",
"phpunit/phpunit": "^8.5 || ^9.5",
"propel/propel": "^2.0@dev",
"propel/propel1": "^1.7",
"ruflin/elastica": "^1.3 || ^2.0 || ^3.0 || ^5.0 || ^6.0 || ^7.0",
"solarium/solarium": "^2.3 || ^3.0 || ^4.0 || ^5.0 || ^6.0",
"symfony/cache": "^4.4 || ^5.2 || ^6.0",
"twig/twig": "^1.35 || ^2.5 || ^3.0"
},
"suggest": {
"twig/twig": "To integrate Pagerfanta with Twig"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Pagerfanta\\": "lib/Core/", "Pagerfanta\\": "./"
"Pagerfanta\\Twig\\": "lib/Twig/", },
"Pagerfanta\\Adapter\\": "src/Adapter/", "exclude-from-classmap": [
"Pagerfanta\\Elastica\\": "lib/Adapter/Elastica/", "Tests/"
"Pagerfanta\\Solarium\\": "lib/Adapter/Solarium/", ]
"Pagerfanta\\Doctrine\\ORM\\": "lib/Adapter/Doctrine/ORM/",
"Pagerfanta\\Doctrine\\DBAL\\": "lib/Adapter/Doctrine/DBAL/",
"Pagerfanta\\Doctrine\\PHPCRODM\\": "lib/Adapter/Doctrine/PHPCRODM/",
"Pagerfanta\\Doctrine\\MongoDBODM\\": "lib/Adapter/Doctrine/MongoDBODM/",
"Pagerfanta\\Doctrine\\Collections\\": "lib/Adapter/Doctrine/Collections/"
}
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
"description": "Pagination for PHP", "description": "Core Pagerfanta API",
"keywords": [ "keywords": [
"page", "pagerfanta"
"pagination",
"paginator",
"paging"
], ],
"support": { "support": {
"issues": "https://github.com/BabDev/Pagerfanta/issues", "source": "https://github.com/Pagerfanta/core/tree/v3.7.0"
"source": "https://github.com/BabDev/Pagerfanta/tree/v2.7.3" },
"time": "2022-12-01T22:53:57+00:00"
}, },
"funding": [
{ {
"url": "https://github.com/mbabker", "name": "pagerfanta/doctrine-orm-adapter",
"type": "github" "version": "v3.7.0",
} "source": {
"type": "git",
"url": "https://github.com/Pagerfanta/doctrine-orm-adapter.git",
"reference": "a76dccd512cd31c5400030e39bc0793caa13da51"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Pagerfanta/doctrine-orm-adapter/zipball/a76dccd512cd31c5400030e39bc0793caa13da51",
"reference": "a76dccd512cd31c5400030e39bc0793caa13da51",
"shasum": ""
},
"require": {
"doctrine/orm": "^2.8",
"pagerfanta/core": "^3.0",
"php": "^7.4 || ^8.0",
"symfony/deprecation-contracts": "^2.1 || ^3.0"
},
"require-dev": {
"doctrine/annotations": "^1.11.1",
"doctrine/cache": "^1.11 || ^2.0",
"phpunit/phpunit": "^9.5",
"symfony/cache": "^4.4 || ^5.4 || ^6.0",
"symfony/phpunit-bridge": "^5.4 || ^6.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Pagerfanta\\Doctrine\\ORM\\": "./"
},
"exclude-from-classmap": [
"Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
], ],
"time": "2022-03-03T00:01:24+00:00" "description": "Pagerfanta adapter for Doctrine ORM",
"keywords": [
"doctrine",
"orm",
"pagerfanta"
],
"support": {
"source": "https://github.com/Pagerfanta/doctrine-orm-adapter/tree/v3.7.0"
},
"time": "2022-12-01T22:53:57+00:00"
},
{
"name": "pagerfanta/twig",
"version": "v3.7.0",
"source": {
"type": "git",
"url": "https://github.com/Pagerfanta/twig.git",
"reference": "e8f60980242db0e744ef926a0263ff3722f502bf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Pagerfanta/twig/zipball/e8f60980242db0e744ef926a0263ff3722f502bf",
"reference": "e8f60980242db0e744ef926a0263ff3722f502bf",
"shasum": ""
},
"require": {
"pagerfanta/core": "^3.0",
"php": "^7.4 || ^8.0",
"symfony/polyfill-php80": "^1.15",
"twig/twig": "^1.35 || ^2.5 || ^3.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"symfony/phpunit-bridge": "^5.4 || ^6.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Pagerfanta\\Twig\\": "./"
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Twig integration for Pagerfanta",
"keywords": [
"pagerfanta"
],
"support": {
"source": "https://github.com/Pagerfanta/twig/tree/v3.7.0"
},
"time": "2022-12-01T22:53:57+00:00"
}, },
{ {
"name": "paragonie/constant_time_encoding", "name": "paragonie/constant_time_encoding",

View file

@ -36,7 +36,7 @@
</div> </div>
{% if current_route == 'search' %}<div><a href="{{ path('tag_this_search', {'filter': searchTerm, 'currentRoute': app.request.get('currentRoute')}) }}" title="{{ 'entry.list.assign_search_tag'|trans }}">{{ 'entry.list.assign_search_tag'|trans }}</a></div>{% endif %} {% if current_route == 'search' %}<div><a href="{{ path('tag_this_search', {'filter': searchTerm, 'currentRoute': app.request.get('currentRoute')}) }}" title="{{ 'entry.list.assign_search_tag'|trans }}">{{ 'entry.list.assign_search_tag'|trans }}</a></div>{% endif %}
{% if entries.getNbPages > 1 %} {% if entries.getNbPages > 1 %}
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} {{ pagerfanta(entries, 'default_wallabag') }}
{% endif %} {% endif %}
</div> </div>
@ -79,7 +79,7 @@
{% if entries.getNbPages > 1 %} {% if entries.getNbPages > 1 %}
<div class="results"> <div class="results">
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} {{ pagerfanta(entries, 'default_wallabag') }}
</div> </div>
{% endif %} {% endif %}

View file

@ -8,7 +8,7 @@
<div class="col s12"> <div class="col s12">
<div class="card-panel"> <div class="card-panel">
{% if users.getNbPages > 1 %} {% if users.getNbPages > 1 %}
{{ pagerfanta(users, 'twitter_bootstrap_translated', {'proximity': 1}) }} {{ pagerfanta(users, 'default_wallabag') }}
{% endif %} {% endif %}
<div class="row"> <div class="row">
<div class="col s6"> <div class="col s6">
@ -59,7 +59,7 @@
<a href="{{ path('user_new') }}" class="waves-effect waves-light btn">{{ 'user.list.create_new_one'|trans }}</a> <a href="{{ path('user_new') }}" class="waves-effect waves-light btn">{{ 'user.list.create_new_one'|trans }}</a>
</p> </p>
{% if users.getNbPages > 1 %} {% if users.getNbPages > 1 %}
{{ pagerfanta(users, 'twitter_bootstrap_translated', {'proximity': 1}) }} {{ pagerfanta(users, 'default_wallabag') }}
{% endif %} {% endif %}
</div> </div>
</div> </div>