Update PagerFanta

This commit is contained in:
Jeremy Benoist 2022-12-14 14:36:29 +01:00
parent ef83032601
commit 67a344c2c6
No known key found for this signature in database
GPG key ID: 7168D5DD29F38552
5 changed files with 171 additions and 113 deletions

View file

@ -278,3 +278,13 @@ services:
Wallabag\ImportBundle\Import\ChromeImport:
tags:
- { 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-tokenizer": "*",
"ext-xml": "*",
"babdev/pagerfanta-bundle": "^2.5",
"babdev/pagerfanta-bundle": "^3.7",
"bdunogier/guzzle-site-authenticator": "^1.0.0",
"craue/config-bundle": "^2.3.0",
"defuse/php-encryption": "^2.1",
@ -89,7 +89,8 @@
"nelmio/api-doc-bundle": "^3.0",
"nelmio/cors-bundle": "~2.2",
"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/rabbitmq-bundle": "^2.11",
"php-http/client-common": "^2.4",

261
composer.lock generated
View file

@ -4,68 +4,68 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "26ce7a6163724bda67e7ea39fa237bd5",
"content-hash": "158ed59536ca89df79f9fdca18270c92",
"packages": [
{
"name": "babdev/pagerfanta-bundle",
"version": "v2.11.0",
"version": "v3.7.0",
"source": {
"type": "git",
"url": "https://github.com/BabDev/PagerfantaBundle.git",
"reference": "98bd0756de82080ace1a2e41e66f618e469da943"
"reference": "d2760ebc3d22db10f219544323bea432dedc9eb0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/BabDev/PagerfantaBundle/zipball/98bd0756de82080ace1a2e41e66f618e469da943",
"reference": "98bd0756de82080ace1a2e41e66f618e469da943",
"url": "https://api.github.com/repos/BabDev/PagerfantaBundle/zipball/d2760ebc3d22db10f219544323bea432dedc9eb0",
"reference": "d2760ebc3d22db10f219544323bea432dedc9eb0",
"shasum": ""
},
"require": {
"pagerfanta/pagerfanta": "^2.7",
"php": "^7.2 || ^8.0",
"symfony/config": "^3.4 || ^4.4 || ^5.3",
"symfony/dependency-injection": "^3.4 || ^4.4 || ^5.3",
"symfony/deprecation-contracts": "^2.1",
"symfony/http-foundation": "^3.4 || ^4.4 || ^5.3",
"symfony/http-kernel": "^3.4 || ^4.4 || ^5.3",
"symfony/property-access": "^3.4 || ^4.4 || ^5.3",
"symfony/routing": "^3.4 || ^4.4 || ^5.3"
"pagerfanta/core": "^3.1",
"php": "^7.4 || ^8.0",
"symfony/config": "^4.4 || ^5.4 || ^6.0",
"symfony/dependency-injection": "^4.4 || ^5.4 || ^6.0",
"symfony/deprecation-contracts": "^2.1 || ^3.0",
"symfony/http-foundation": "^4.4 || ^5.4 || ^6.0",
"symfony/http-kernel": "^4.4 || ^5.4 || ^6.0",
"symfony/polyfill-php80": "^1.15",
"symfony/property-access": "^4.4 || ^5.4 || ^6.0",
"symfony/routing": "^4.4 || ^5.4 || ^6.0"
},
"conflict": {
"pagerfanta/twig": "<3.1",
"twig/twig": "<1.35 || >=2.0,<2.5",
"white-october/pagerfanta-bundle": "*"
},
"require-dev": {
"doctrine/annotations": "^1.8",
"jms/serializer": "^3.0",
"jms/serializer-bundle": "^3.0",
"matthiasnoback/symfony-dependency-injection-test": "^4.1",
"jms/serializer-bundle": "^3.0 || ^4.0",
"matthiasnoback/symfony-dependency-injection-test": "^4.3",
"pagerfanta/twig": "^3.1",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^0.12.94",
"phpstan/phpstan-phpunit": "^0.12.21",
"phpstan/phpstan-symfony": "^0.12.41",
"phpunit/phpunit": "^8.5 || ^9.3",
"symfony/phpunit-bridge": "^4.4 || ^5.3",
"symfony/serializer": "^3.4 || ^4.4 || ^5.3",
"symfony/translation": "^3.4 || ^4.4 || ^5.3",
"symfony/twig-bridge": "^3.4 || ^4.4 || ^5.3",
"symfony/twig-bundle": "^3.4 || ^4.4 || ^5.3",
"phpstan/phpstan": "1.7.2",
"phpstan/phpstan-phpunit": "1.1.1",
"phpstan/phpstan-symfony": "1.2.0",
"phpunit/phpunit": "^9.5",
"symfony/phpunit-bridge": "^5.4 || ^6.0",
"symfony/serializer": "^4.4 || ^5.4 || ^6.0",
"symfony/translation": "^4.4 || ^5.4 || ^6.0",
"symfony/twig-bridge": "^4.4 || ^5.4 || ^6.0",
"symfony/twig-bundle": "^4.4 || ^5.4 || ^6.0",
"twig/twig": "^1.35 || ^2.5 || ^3.0"
},
"suggest": {
"jms/serializer-bundle": "To use the Pagerfanta class with the JMS 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"
},
"type": "symfony-bundle",
"autoload": {
"psr-4": {
"BabDev\\PagerfantaBundle\\": ""
},
"exclude-from-classmap": [
"Tests/"
]
"BabDev\\PagerfantaBundle\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@ -79,7 +79,7 @@
],
"support": {
"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": [
{
@ -87,7 +87,7 @@
"type": "github"
}
],
"time": "2021-08-01T16:42:35+00:00"
"time": "2022-05-27T20:58:26+00:00"
},
{
"name": "bacon/bacon-qr-code",
@ -6322,100 +6322,147 @@
"time": "2021-12-01T09:34:27+00:00"
},
{
"name": "pagerfanta/pagerfanta",
"version": "v2.7.3",
"name": "pagerfanta/core",
"version": "v3.7.0",
"source": {
"type": "git",
"url": "https://github.com/BabDev/Pagerfanta.git",
"reference": "5f2aa1f1c9d1a6520f459e84b63e2bc25e9eea5b"
"url": "https://github.com/Pagerfanta/core.git",
"reference": "53c0bfdffc18fb816ae5c08e4bdda0773651bacc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/BabDev/Pagerfanta/zipball/5f2aa1f1c9d1a6520f459e84b63e2bc25e9eea5b",
"reference": "5f2aa1f1c9d1a6520f459e84b63e2bc25e9eea5b",
"url": "https://api.github.com/repos/Pagerfanta/core/zipball/53c0bfdffc18fb816ae5c08e4bdda0773651bacc",
"reference": "53c0bfdffc18fb816ae5c08e4bdda0773651bacc",
"shasum": ""
},
"require": {
"ext-json": "*",
"php": "^7.2 || ^8.0",
"symfony/deprecation-contracts": "^2.1",
"php": "^7.4 || ^8.0",
"symfony/deprecation-contracts": "^2.1 || ^3.0",
"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": {
"dg/bypass-finals": "^1.3.1",
"doctrine/cache": "^1.11 || ^2.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"
"phpunit/phpunit": "^9.5",
"symfony/phpunit-bridge": "^5.4 || ^6.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Pagerfanta\\": "lib/Core/",
"Pagerfanta\\Twig\\": "lib/Twig/",
"Pagerfanta\\Adapter\\": "src/Adapter/",
"Pagerfanta\\Elastica\\": "lib/Adapter/Elastica/",
"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/"
}
"Pagerfanta\\": "./"
},
"exclude-from-classmap": [
"Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Pagination for PHP",
"description": "Core Pagerfanta API",
"keywords": [
"page",
"pagination",
"paginator",
"paging"
"pagerfanta"
],
"support": {
"issues": "https://github.com/BabDev/Pagerfanta/issues",
"source": "https://github.com/BabDev/Pagerfanta/tree/v2.7.3"
"source": "https://github.com/Pagerfanta/core/tree/v3.7.0"
},
"funding": [
{
"url": "https://github.com/mbabker",
"type": "github"
}
"time": "2022-12-01T22:53:57+00:00"
},
{
"name": "pagerfanta/doctrine-orm-adapter",
"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",
@ -12856,16 +12903,16 @@
},
{
"name": "phpstan/phpstan-symfony",
"version": "1.2.17",
"version": "1.2.18",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan-symfony.git",
"reference": "738920755edd12c693ae83ab73b8f6bfa220a091"
"reference": "3178f15a60b62df21ddd202f6a668851eeb138c7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/738920755edd12c693ae83ab73b8f6bfa220a091",
"reference": "738920755edd12c693ae83ab73b8f6bfa220a091",
"url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/3178f15a60b62df21ddd202f6a668851eeb138c7",
"reference": "3178f15a60b62df21ddd202f6a668851eeb138c7",
"shasum": ""
},
"require": {
@ -12921,9 +12968,9 @@
"description": "Symfony Framework extensions and rules for PHPStan",
"support": {
"issues": "https://github.com/phpstan/phpstan-symfony/issues",
"source": "https://github.com/phpstan/phpstan-symfony/tree/1.2.17"
"source": "https://github.com/phpstan/phpstan-symfony/tree/1.2.18"
},
"time": "2022-12-15T14:28:17+00:00"
"time": "2022-12-16T09:43:26+00:00"
},
{
"name": "symfony/maker-bundle",

View file

@ -36,7 +36,7 @@
</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 entries.getNbPages > 1 %}
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
{{ pagerfanta(entries, 'default_wallabag') }}
{% endif %}
</div>
@ -79,7 +79,7 @@
{% if entries.getNbPages > 1 %}
<div class="results">
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
{{ pagerfanta(entries, 'default_wallabag') }}
</div>
{% endif %}

View file

@ -8,7 +8,7 @@
<div class="col s12">
<div class="card-panel">
{% if users.getNbPages > 1 %}
{{ pagerfanta(users, 'twitter_bootstrap_translated', {'proximity': 1}) }}
{{ pagerfanta(users, 'default_wallabag') }}
{% endif %}
<div class="row">
<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>
</p>
{% if users.getNbPages > 1 %}
{{ pagerfanta(users, 'twitter_bootstrap_translated', {'proximity': 1}) }}
{{ pagerfanta(users, 'default_wallabag') }}
{% endif %}
</div>
</div>