PHPackages                             vinyvicente/silex-knp-paginator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. vinyvicente/silex-knp-paginator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vinyvicente/silex-knp-paginator
===============================

Paginator Provider to Silex 2.0

v1.0.3(8y ago)082.8k1MITPHPPHP 5.6 || &gt;=7.0

Since Jan 11Pushed 8y ago1 watchersCompare

[ Source](https://github.com/vinyvicente/silex-knp-paginator)[ Packagist](https://packagist.org/packages/vinyvicente/silex-knp-paginator)[ RSS](/packages/vinyvicente-silex-knp-paginator/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (7)Versions (5)Used By (0)

silex-knp-paginator
===================

[](#silex-knp-paginator)

Plugin KNP Paginator to Silex 2.0

[![Latest Stable Version](https://camo.githubusercontent.com/4eabf4172e527fe41f64c2ff00b305aab5944a34d0ea2ed4cc01b0aa9775820d/68747470733a2f2f706f7365722e707567782e6f72672f76696e79766963656e74652f73696c65782d6b6e702d706167696e61746f722f762f737461626c65)](https://packagist.org/packages/vinyvicente/silex-knp-paginator)[![Total Downloads](https://camo.githubusercontent.com/2c45ad1162d5893abec4ab9e178ca29d08dc7e37b39c5cec9b03d26790c7fea9/68747470733a2f2f706f7365722e707567782e6f72672f76696e79766963656e74652f73696c65782d6b6e702d706167696e61746f722f646f776e6c6f616473)](https://packagist.org/packages/vinyvicente/silex-knp-paginator)[![Latest Unstable Version](https://camo.githubusercontent.com/8d792bba8ced537741ae7eb712bb1512b6f9e9322d6c2655549eaf72358cd71e/68747470733a2f2f706f7365722e707567782e6f72672f76696e79766963656e74652f73696c65782d6b6e702d706167696e61746f722f762f756e737461626c65)](https://packagist.org/packages/vinyvicente/silex-knp-paginator)[![License](https://camo.githubusercontent.com/183ba2a75db9957fd39dafe6ffbc44fe86e75ebb740cfae26896d1cd3401cf8c/68747470733a2f2f706f7365722e707567782e6f72672f76696e79766963656e74652f73696c65782d6b6e702d706167696e61746f722f6c6963656e7365)](https://packagist.org/packages/vinyvicente/silex-knp-paginator)[![Monthly Downloads](https://camo.githubusercontent.com/38b02461da8ba297298a172a62730b35fba93a5d45677c52d91c026b9796e9da/68747470733a2f2f706f7365722e707567782e6f72672f76696e79766963656e74652f73696c65782d6b6e702d706167696e61746f722f642f6d6f6e74686c79)](https://packagist.org/packages/vinyvicente/silex-knp-paginator)[![composer.lock](https://camo.githubusercontent.com/945de1410ded92137c36370b06b0d404db2bca83013ed5f94157353de50ccc34/68747470733a2f2f706f7365722e707567782e6f72672f76696e79766963656e74652f73696c65782d6b6e702d706167696e61746f722f636f6d706f7365726c6f636b)](https://packagist.org/packages/vinyvicente/silex-knp-paginator)

Dependencies
------------

[](#dependencies)

- PHP 7+
- Silex 2.0+
- Twig 2.0+

How to Use
----------

[](#how-to-use)

#### Based on Knp Pagination Bundle

[](#based-on-knp-pagination-bundle)

See more: [Docs](https://github.com/KnpLabs/KnpPaginatorBundle)

### Integrating with Silex below

[](#integrating-with-silex-below)

```
require 'vendor/autoload.php';

use Silex\Application;
use Silex\Knp\PaginatorProvider;
use Symfony\Component\HttpFoundation\Request;

$app = new Application();
$app['debug'] = true;
$app->register(new Silex\Provider\TwigServiceProvider(), array(
    'twig.path' => __DIR__ . '/views',
));

// needs be after twig register :)
$app->register(new PaginatorProvider());

$app['knp_paginator.options'] = array(
    'default_options' => array(
        'sort_field_name' => 'sort',
        'sort_direction_name' => 'direction',
        'filter_field_name' => 'filterField',
        'filter_value_name' => 'filterValue',
        'page_name' => 'page',
        'distinct' => true,
    ),
    'template' => array(
        'pagination' => '@knp_paginator_bundle/sliding.html.twig',
        'filtration' => '@knp_paginator_bundle/filtration.html.twig',
        'sortable' => '@knp_paginator_bundle/sortable_link.html.twig',
    ),
    'page_range' => 5,
);

$app->get('/', function(Request $request) use ($app) {

    $array = [
        'foo' => ['id' => 'foo'],
        'bar' => ['id' => 'bar'],
        'baz' => ['id' => 'baz'],
        'echo' => ['id' => 'echo'],
        'delta' => ['id' => 'delta'],
    ];

    $currentPage = (!empty($request->get('page'))) ? $request->get('page') : 1;
    $limitPage = 3;

    $sort = $request->get('sort');
    $direction = $request->get('direction', 'asc');

    $knp = $app['knp_paginator'];
    $paginator = $knp->paginate($array, $currentPage, $limitPage);
    $paginator->setCurrentPageNumber($currentPage);
    $paginator->setItemNumberPerPage($limitPage);

    return $app['twig']->render('example.html.twig', ['pagination' => $paginator]);
});

$app->run();
```

### Twig

[](#twig)

[Read the Docs](https://github.com/KnpLabs/KnpPaginatorBundle#view)

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 76.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~149 days

Total

4

Last Release

3005d ago

PHP version history (3 changes)v1.0PHP &gt;=5.6

v1.0.2PHP &gt;=7.0

v1.0.3PHP 5.6 || &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f138472fcd552fb1d4820f4ce9b99a805663e0f4a8eb700e80ee40efdae392f5?d=identicon)[vinyvicente](/maintainers/vinyvicente)

---

Top Contributors

[![vinyvicente](https://avatars.githubusercontent.com/u/513934?v=4)](https://github.com/vinyvicente "vinyvicente (10 commits)")[![hkdobrev](https://avatars.githubusercontent.com/u/506129?v=4)](https://github.com/hkdobrev "hkdobrev (3 commits)")

---

Tags

knppaginationpaginatorplugin-knp-paginatorsilex-knp-paginatorsilex2

### Embed Badge

![Health badge](/badges/vinyvicente-silex-knp-paginator/health.svg)

```
[![Health](https://phpackages.com/badges/vinyvicente-silex-knp-paginator/health.svg)](https://phpackages.com/packages/vinyvicente-silex-knp-paginator)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M376](/packages/easycorp-easyadmin-bundle)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M462](/packages/pimcore-pimcore)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M519](/packages/shopware-core)[chameleon-system/chameleon-base

The Chameleon System core.

1027.9k4](/packages/chameleon-system-chameleon-base)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
