Ported EventsController. composer require knplabs/knp-paginator-bundle.

This commit is contained in:
Alexey Skobkin 2023-04-01 20:20:38 +03:00
parent 0c48b57710
commit fc9026d13f
No known key found for this signature in database
GPG Key ID: 5D5CEF6F221278E7
7 changed files with 174 additions and 7 deletions

View File

@ -12,6 +12,7 @@
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/orm": "^2.14",
"jms/serializer-bundle": "^5.2",
"knplabs/knp-paginator-bundle": "^6.2",
"phpdocumentor/reflection-docblock": "^5.3",
"phpstan/phpdoc-parser": "^1.16",
"sensio/framework-extra-bundle": "^6.1",

162
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "3e4ae473183073d1dd231517f5734c3e",
"content-hash": "adf20c9a601a7f685ece9da4a4ac9e47",
"packages": [
{
"name": "doctrine/annotations",
@ -2013,6 +2013,166 @@
],
"time": "2023-02-05T11:03:45+00:00"
},
{
"name": "knplabs/knp-components",
"version": "v4.1.0",
"source": {
"type": "git",
"url": "https://github.com/KnpLabs/knp-components.git",
"reference": "6b6efa81ee894e325744bf785d50dc962937b1f2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/KnpLabs/knp-components/zipball/6b6efa81ee894e325744bf785d50dc962937b1f2",
"reference": "6b6efa81ee894e325744bf785d50dc962937b1f2",
"shasum": ""
},
"require": {
"php": "^8.0",
"symfony/event-dispatcher-contracts": "^3.0"
},
"conflict": {
"doctrine/dbal": "<2.10"
},
"require-dev": {
"doctrine/mongodb-odm": "^2.4",
"doctrine/orm": "^2.12",
"doctrine/phpcr-odm": "^1.6",
"ext-pdo_sqlite": "*",
"jackalope/jackalope-doctrine-dbal": "^1.8",
"phpunit/phpunit": "^9.5",
"propel/propel1": "^1.7",
"ruflin/elastica": "^7.0",
"solarium/solarium": "^6.0",
"symfony/http-foundation": "^5.4 || ^6.0",
"symfony/http-kernel": "^5.4 || ^6.0",
"symfony/property-access": "^5.4 || ^6.0"
},
"suggest": {
"doctrine/common": "to allow usage pagination with Doctrine ArrayCollection",
"doctrine/mongodb-odm": "to allow usage pagination with Doctrine ODM MongoDB",
"doctrine/orm": "to allow usage pagination with Doctrine ORM",
"doctrine/phpcr-odm": "to allow usage pagination with Doctrine ODM PHPCR",
"propel/propel1": "to allow usage pagination with Propel ORM",
"ruflin/elastica": "to allow usage pagination with ElasticSearch Client",
"solarium/solarium": "to allow usage pagination with Solarium Client",
"symfony/http-foundation": "to retrieve arguments from Request",
"symfony/property-access": "to allow sorting arrays"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.x-dev"
}
},
"autoload": {
"psr-4": {
"Knp\\Component\\": "src/Knp/Component"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "KnpLabs Team",
"homepage": "https://knplabs.com"
},
{
"name": "Symfony Community",
"homepage": "https://github.com/KnpLabs/knp-components/contributors"
}
],
"description": "Knplabs component library",
"homepage": "http://github.com/KnpLabs/knp-components",
"keywords": [
"components",
"knp",
"knplabs",
"pager",
"paginator"
],
"support": {
"issues": "https://github.com/KnpLabs/knp-components/issues",
"source": "https://github.com/KnpLabs/knp-components/tree/v4.1.0"
},
"time": "2022-12-19T09:36:54+00:00"
},
{
"name": "knplabs/knp-paginator-bundle",
"version": "v6.2.0",
"source": {
"type": "git",
"url": "https://github.com/KnpLabs/KnpPaginatorBundle.git",
"reference": "8da698f0856b1d9c9c02dcacbfc382c5c9440c80"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/KnpLabs/KnpPaginatorBundle/zipball/8da698f0856b1d9c9c02dcacbfc382c5c9440c80",
"reference": "8da698f0856b1d9c9c02dcacbfc382c5c9440c80",
"shasum": ""
},
"require": {
"knplabs/knp-components": "^4.1",
"php": "^8.0",
"symfony/config": "^6.0",
"symfony/dependency-injection": "^6.0",
"symfony/event-dispatcher": "^6.0",
"symfony/http-foundation": "^6.0",
"symfony/http-kernel": "^6.0",
"symfony/routing": "^6.0",
"symfony/translation": "^6.0",
"twig/twig": "^3.0"
},
"require-dev": {
"phpstan/phpstan": "^1.9",
"phpunit/phpunit": "^9.5",
"symfony/expression-language": "^6.0",
"symfony/templating": "^6.0"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "5.x-dev"
}
},
"autoload": {
"psr-4": {
"Knp\\Bundle\\PaginatorBundle\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "KnpLabs Team",
"homepage": "https://knplabs.com"
},
{
"name": "Symfony Community",
"homepage": "https://github.com/KnpLabs/KnpPaginatorBundle/contributors"
}
],
"description": "Paginator bundle for Symfony to automate pagination and simplify sorting and other features",
"homepage": "https://github.com/KnpLabs/KnpPaginatorBundle",
"keywords": [
"bundle",
"knp",
"knplabs",
"pager",
"pagination",
"paginator",
"symfony"
],
"support": {
"issues": "https://github.com/KnpLabs/KnpPaginatorBundle/issues",
"source": "https://github.com/KnpLabs/KnpPaginatorBundle/tree/v6.2.0"
},
"time": "2023-03-25T06:51:40+00:00"
},
{
"name": "monolog/monolog",
"version": "3.3.1",

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
@ -13,4 +14,5 @@ return [
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true],
Knp\Bundle\PaginatorBundle\KnpPaginatorBundle::class => ['all' => true],
];

View File

@ -0,0 +1,4 @@
# https://github.com/KnpLabs/KnpPaginatorBundle#yaml
knp_paginator:
template:
pagination: 'KnpPaginatorBundle:Pagination:twitter_bootstrap_v3_pagination.html.twig'

View File

@ -83,10 +83,6 @@ knp_markdown:
parser:
service: app.point.markdown_parser
knp_paginator:
template:
pagination: KnpPaginatorBundle:Pagination:twitter_bootstrap_v3_pagination.html.twig
csa_guzzle:
profiler: '%kernel.debug%'

View File

@ -1,9 +1,10 @@
<?php
declare(strict_types=1);
namespace src\PointToolsBundle\Controller;
namespace App\Controller;
use Knp\Component\Pager\PaginatorInterface;
use src\PointToolsBundle\Repository\SubscriptionEventRepository;
use App\Repository\SubscriptionEventRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\{Request, Response};

View File

@ -47,6 +47,9 @@
"config/packages/jms_serializer.yaml"
]
},
"knplabs/knp-paginator-bundle": {
"version": "v6.2.0"
},
"phpunit/phpunit": {
"version": "9.6",
"recipe": {