PHPackages                             dimmir/paginator-bundle - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. dimmir/paginator-bundle

ActiveLibrary[HTTP &amp; Networking](/categories/http)

dimmir/paginator-bundle
=======================

Flexible pagination bundle for Symfony 3. Created for use on the REST API

1.0.2(8y ago)129[1 issues](https://github.com/dimmir/PaginatorBundle/issues)MITPHPPHP &gt;=7.0

Since May 22Pushed 8y ago1 watchersCompare

[ Source](https://github.com/dimmir/PaginatorBundle)[ Packagist](https://packagist.org/packages/dimmir/paginator-bundle)[ RSS](/packages/dimmir-paginator-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

PaginatorBundle
===============

[](#paginatorbundle)

Flexible pagination bundle for Symfony 3. This bundle provides an easy way to add pagination support to the collection of your API. It easy used with FOSRestBundle

[![Build Status](https://camo.githubusercontent.com/a18076fe4d0535ae1cc70a64b33e3c9102364ea5cb22f297dd3263fc293820da/68747470733a2f2f7472617669732d63692e6f72672f64696d6d69722f506167696e61746f7242756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/dimmir/PaginatorBundle) [![Coverage Status](https://camo.githubusercontent.com/c50b5ee923190e0237e873c3d8276212e3ed6b04955a0aa563e8aada1e9added/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f64696d6d69722f506167696e61746f7242756e646c652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/dimmir/PaginatorBundle?branch=master) [![Dependency Status](https://camo.githubusercontent.com/553863b62c688ae36d607c6287a26276e9dfd76512f6e376727fb17a689687fc/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3539323465646330383563643238303033323430663435662f62616467652e7376673f7374796c653d666c61742d737175617265)](https://www.versioneye.com/user/projects/5924edc085cd28003240f45f)

Installation:
-------------

[](#installation)

You can install this bundle using composer:

```
composer require dimmir/paginator-bundle
```

Add the bundle to your AppKernel.php file:

```
// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new DMR\Bundle\PaginatorBundle\PaginatorBundle(),
        // ...
    );
}
```

Configuration
-------------

[](#configuration)

```
dmr_paginator:
    items_per_page: 25                                  # default number items per page
    max_items_per_page: ~                               # The maximum number of items per page.
    page_request_parameter_name: page                   # The name of current page for query parameter
    client_items_per_page: false                        # To allow the client to set the number of items per page.
    items_per_page_request_parameter_name: itemsPerPage # The name of items per page query parameter
    options:                                            # options fo Paginator
        fetch_join_collection: true                     # The option fetchJoinCollection for Doctrine ORM Paginator
```

Usage
-----

[](#usage)

Currently paginator can paginate:

- `Doctrine\ORM\QueryBuilder`

Example for used with FOSRestBundle:

```
// AppBundle\Controller\UserController.php

    /**
     * @View()
     */
    public function cgetAction (Request $request)
    {
        $queryBuilder = $this->getDoctrine()->getManager()
                    ->getRepository('AppBundle:User')->createQueryBuilder('u');

        $paginator = $this->get('dmr_paginator.service')->pagination($queryBuilder);

        return new SliderRepresentation($paginator);
    }
```

### Representations

[](#representations)

DMR\\Bundle\\PaginatorBundle\\Representation\\CollectionRepresentation:

```
{
  "items": [
    {
      "id": 1,
    },
  ],
  "pagination": {
    "page": 1,
    "itemsPerPage": 25,
    "totalItemsCount": 40,
    "pagesCount": 2
  }
}
```

DMR\\Bundle\\PaginatorBundle\\Representation\\SliderRepresentation:

```
{
  "items": [
    {
      "id": 1,
    },
  ],
  "previus": 1,
  "next": 3
}
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

3280d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1d3c5d25be71d555e85fa447f214dd883c9fdc47558a51d38c8895f558411ac1?d=identicon)[dimmir](/maintainers/dimmir)

---

Top Contributors

[![dimmir](https://avatars.githubusercontent.com/u/2556720?v=4)](https://github.com/dimmir "dimmir (18 commits)")

---

Tags

paginationpaginatorrest-apisymfonysymfony-bundleapirestpagepagerpaginatorpaginationrest pagination

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dimmir-paginator-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/dimmir-paginator-bundle/health.svg)](https://phpackages.com/packages/dimmir-paginator-bundle)
```

###  Alternatives

[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.3k63.6M233](/packages/nelmio-api-doc-bundle)[api-platform/doctrine-orm

Doctrine ORM bridge

243.1M39](/packages/api-platform-doctrine-orm)[gointegro/hateoas-bundle

GOintegro HATEOAS Bundle

6810.6k](/packages/gointegro-hateoas-bundle)[adrotec/breeze.server.php

Breeze JS support for Symfony 2 or any other PHP 5.3+ application

2615.8k1](/packages/adrotec-breezeserverphp)

PHPackages © 2026

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