PHPackages                             pportelette/pageable-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. [Database &amp; ORM](/categories/database)
4. /
5. pportelette/pageable-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

pportelette/pageable-bundle
===========================

This Bundle provides pagination repository's method based on Doctrine Paginator

v0.3.1(4w ago)0391MITPHPPHP &gt;=7.2.5

Since Feb 8Pushed 4w ago1 watchersCompare

[ Source](https://github.com/pportelette/SymfonyPageableBundle)[ Packagist](https://packagist.org/packages/pportelette/pageable-bundle)[ RSS](/packages/pportelette-pageable-bundle/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (4)Versions (11)Used By (1)

PageableBundle
==============

[](#pageablebundle)

This bundle adds a method 'getPage' to a Doctrine repository that paginates the result of a query. It provides also the methods 'add' and 'remove'.

Installation
------------

[](#installation)

Open a command console, enter your project directory and execute:

```
$ composer require pportelette/pageable-bundle
```

Applications that don't use Symfony Flex
----------------------------------------

[](#applications-that-dont-use-symfony-flex)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    Pportelette\PageableBundle\PportelettePageableBundle::class => ['all' => true],
];
```

Usage
-----

[](#usage)

From a doctrine repository:

```
// src/Repository/MyRepository.php
use Pportelette\PageableBundle\Repository\AbstractRepository;
use Pportelette\PageableBundle\Model\Pageable;

class MyRepository extends AbstractRepository
{
    public function getAllPaginated(int $page): Pageable {
        $queryBuilder = $this->createQueryBuilder('e');

        $nbPerPage = 50;

        return $this->getPage(
            $queryBuilder,
            $page,
            $nbPerPage
        );
    }
}
```

That's it!

The third parameter is optional and is '30' by default. It is possible to change the default value by adding a configuration file:

```
# config/packages/pportelette_pageable.yaml
pportelette_pageable:
  default:
    nb_per_page: 50
```

### Filters and sorting

[](#filters-and-sorting)

You can filter or sort your results by binding query params to a column alias, even on joined tables :

```
public function getUsers(int $page, array $queryParams): Pageable
{
    // bind query params to columns
    $this->addFilter('email', 'u.email');
    $this->addFilter('country', 'c.name');

    $qb = $this->createQueryBuilder('u')
        ->leftJoin('u.country', 'c');

    // this will add the conditions to the where
    $this->setFilters($qb, $queryParams);

    return $this->getPage(
        $qb,
        $page,
    );
}
```

In the example above, if `$queryParams = ['email' => '@test.com', 'country' => 'france', 'sort' => 'country,ASC']`, it will generate the following sql :

```
WHERE u.email LIKE '%@test.com%' AND c.name LIKE '%france%'
ORDER BY c.name ASC
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance94

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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 ~99 days

Recently: every ~146 days

Total

10

Last Release

28d ago

### Community

Maintainers

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

---

Top Contributors

[![pportelette](https://avatars.githubusercontent.com/u/20822596?v=4)](https://github.com/pportelette "pportelette (13 commits)")

### Embed Badge

![Health badge](/badges/pportelette-pageable-bundle/health.svg)

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k18.3M430](/packages/easycorp-easyadmin-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

12017.1k](/packages/rcsofttech-audit-trail-bundle)[kimai/kimai

Kimai - Time Tracking

4.8k9.4k1](/packages/kimai-kimai)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

12413.3k](/packages/ahmed-bhs-doctrine-doctor)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1617.3k16](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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