ttskch/paginator-bundle
A lightweight Symfony bundle for simple, flexible pagination. Turn Doctrine queries or arrays into paginated results with sortable pages, configurable page sizes, and Twig-friendly output for building list screens quickly.
Framework mismatch is the headline finding. Despite the "Laravel/PHP" framing, this is a Symfony bundle: a Bundle subclass, a DI extension, service definitions, and Twig-oriented defaults. It has no ServiceProvider, no publishable config, no facade. It will composer require into a Laravel app and then do nothing — the bundle is never booted by Laravel's kernel. Any evaluation must start by confirming which framework we are actually targeting; if the answer is Laravel, the package is disqualified as a dependency and survives only as a reference design.
Architecture fit. The bundle is a thin wiring layer over ttskch/paginator-component, itself a thin layer over Pagerfanta, plus Doctrine ORM/ODM query-builder adapters and a sortable-columns helper. The value is convenience plumbing, not a novel algorithm or data structure. That means the reusable surface is narrow: the parts worth stealing are the query-string-preserving sort ergonomics and the criteria-binding API, roughly 100–200 lines of logic, not a library.
Integration feasibility. Low as-is. Moderate if reframed: Pagerfanta is framework-agnostic and has a maintained Laravel bridge, so the pagination core is portable even though this bundle is not. Reimplementing the ergonomic layer on top of Laravel's native paginator is a one-to-two-day task and eliminates the dependency entirely.
Technical risk.
Key questions.
paginate() / simplePaginate() in any measurable way?Stack fit. Poor for a Laravel-first shop. Acceptable only if the target is a Symfony application, where the bundle is idiomatic and installs cleanly. Resolve this before any further work; every downstream decision inverts depending on the answer.
Migration path (Laravel). There is none — not a hard migration, but no path at all. Do not add it as a dependency. Harvest the design: implement a small Sortable trait plus a query-string-preserving paginator over Eloquent, whitelisting sortable columns. That reproduces the package's differentiating ergonomics at a fraction of the integration and ownership cost.
Migration path (Symfony, if applicable). composer require ttskch/paginator-bundle, register in config/bundles.php, configure the default template, page query key, and page-size bounds, then inject PaginatorInterface and wrap a QueryBuilder. Realistically an hour of work. Pin the exact version given release sparsity.
Compatibility. Expect the binding constraints to be PHP minor version and Doctrine ORM/ODM majors rather than Symfony itself. Audit those constraints against our upgrade calendar before adopting; they are the most likely source of a forced fork.
Sequencing.
Maintenance. Upstream velocity is effectively zero. If we fork, we should assume we are the maintainer of record from day one. The cost is not the license; it is the annual rebase against PHP and Doctrine majors plus the security review of a codebase nobody else is watching.
Support. GitHub issues only, no SLA, no documented security disclosure process, no commercial backing. For non-critical admin screens that is acceptable. For revenue-path pagination — catalog browse, search results, feed ordering — it is not: an unpatched Doctrine incompatibility on an upgrade cycle becomes our incident.
Scaling. Pagination itself is O(1) application-side, but offset pagination is O(offset) in the database and this bundle does not offer keyset alternatives. Watch two costs specifically: the mandatory COUNT on every page render over wide joins, and entity hydration when paginated results carry relations (classic N+1). Neither is caused by the package, but neither is mitigated by it, and teams often assume a pagination library has solved them.
Failure modes.
?page= and ?sort= parameters. Sort field handling is the injection-adjacent surface here — column names must be whitelisted explicitly rather than passed through, and the thin bundle does not fully protect against this.GROUP BY or HAVING.Ramp-up. Near-zero for a Symfony developer already familiar with Pagerfanta; the bundle is small enough to read end-to-end in an afternoon, which is genuinely a virtue. For a Laravel team the ramp-up is net negative — they will spend more time understanding why it does nothing than it would take to write the 150 lines they need. Factor onboarding into the decision: a dependency nobody on the team can debug is an operational liability regardless of its code quality.
Recommendation. Do not adopt. Treat as a design reference for sortable, filter-aware pagination and rebuild the ergonomics natively in the target framework. Revisit only if a Symfony application enters scope and a concrete feature gap over native pagination is documented — in which case pin, vendor, and assign an owner before the first commit.
How can I help you explore Laravel packages today?