Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Pager Bundle Laravel Package

symfony-twig/pager-bundle

symfony-twig/pager-bundle is a Symfony bundle for adding Twig-powered pagination to your projects. It provides reusable pager rendering and page navigation controls, helping you display paginated lists with configurable ranges and simple template integration.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — disqualified for a Laravel codebase. The package is a Symfony bundle (type symfony-bundle), not a Laravel package. It depends on Symfony's HTTP kernel, bundle registration (bundles.php / AppKernel), the Symfony service container, and Twig as the view layer. Laravel has no bundle system, uses Blade by default, and its service-provider lifecycle — while conceptually analogous — is not binary-compatible. Even in a Symfony context the fit is weak: Symfony ships Pagerfanta, KnpPaginatorBundle, and its own Paginator, all more maintained and adopted. The catalog classification as a "Laravel/PHP package" is a metadata error a TPM should flag on day one.

Integration feasibility — low to non-existent for Laravel. Forcing this into a Laravel app would require adding twig/twig plus a Twig bridge, shimming Symfony bundle/config loading into a service provider, writing an adapter that feeds Eloquent/query-builder results into the package's pager abstraction, and re-rendering the UI in Blade (or committing to Twig for a subset of views). That is a rewrite of a few hundred lines of commodity logic at strictly higher cost than building directly on LengthAwarePaginator, which already handles ?page= parsing, query-string preservation, and links() rendering.

Technical risk — high.

  • Adoption signal is zero: 0 stars, 0 dependents. No downstream users means no field-testing, no issue backlog to read, no evidence of production hardening.
  • EOL framework pin: targeting Symfony ≥3 (EOL since 2021) signals the code will not track Twig 3, PHP 8.x, or modern Symfony. It is a framework-upgrade blocker waiting to happen.
  • Bus factor of one: single maintainer, no visible CI, changelog, or release cadence.
  • Supply chain: low adoption cuts both ways — low odds of a malicious payload, but also low odds anyone has audited it. MIT is permissive and unproblematic; the concern is provenance and longevity.
  • Functional ceiling: pagination is presentation-layer; it does not solve the hard problem (counting/offsetting large result sets), so the risk buys almost nothing.

Key questions a TPM must resolve before any further investment:

  1. Do we actually operate Symfony ≥3 services, or is "Laravel/PHP package" a mis-categorisation? If no Symfony, close the ticket.
  2. What pagination requirement is unmet by LengthAwarePaginator (Laravel) or Pagerfanta (Symfony)? If none, there is no problem.
  3. Who owns the code if we fork it, and how many framework upgrades is it allowed to block?
  4. Does it handle joins, GROUP BY, HAVING, DISTINCT correctly, or assume single-table counts?
  5. What PHP/Twig constraints does composer.json declare, and do they intersect our supported matrix?
  6. Is there any test suite or CI we can inspect, or is the code unverified?

Integration Approach

Stack fit — not viable for Laravel. There is no path where a Symfony bundle is a dependency of a Laravel app without an adapter layer we own and maintain indefinitely. The honest classification: candidate for a Symfony ≥3 legacy app, disqualified for a Laravel codebase.

Migration path. There is nothing to migrate from; the recommended path is the inverse — do not introduce it, and if a legacy Symfony service already uses it, plan an exit:

  • Exit target: Pagerfanta (Symfony) or native LengthAwarePaginator (Laravel).
  • Containment: wrap behind an internal PaginatorInterface (paginate(Query, int $perPage): PageResult) so the vendor call site is one adapter class, not scattered across controllers and templates.
  • View decoupling: return a neutral page-result DTO (items, total, perPage, currentPage) and let each stack render its own links — this makes eventual swap a single-file change and removes the Twig dependency from the blast radius.

Compatibility. Verify composer.json constraints against our PHP matrix and Twig major version before writing code. Expect friction on PHP 8.1+ (implicit nullable params, dynamic properties) and Twig 3 (deprecated spaceless, changed escaping defaults). Symfony 3's EOL means Composer security-advisory checks will flag it and long-term support is unavailable.

Sequencing (if a spike is approved despite the above):

  1. Day 0 — classify: confirm whether any target service is Symfony ≥3. If not, close the evaluation.
  2. Day 1–2 — spike: isolated branch, install, wire one list view end-to-end, measure whether the package saves any code versus a ~40-line in-house paginator. Expect the answer to be "no."
  3. Day 3 — decision memo: ship the comparison (LOC, upgrade risk, ownership cost) to the architecture forum.
  4. Only if it survives: containment interface + adapter + contract test, then adopt. Budget for a fork within 12 months.
  5. Parallel track regardless: standardise pagination as an internal convention (page-size defaults, max page size, query-string contract, cursor pagination for high-volume endpoints) so teams stop reaching for micro-packages.

Operational Impact

Maintenance — you inherit it. With 0 dependents and a single maintainer on an EOL framework major, the realistic planning assumption is that upstream receives no further releases. Any adoption is effectively a permanent fork: we patch PHP 8.x deprecations, Twig API changes, and any counting bug ourselves. Estimate a few days per year of unplanned work plus the compounding cost of a blocked framework upgrade.

Support — none. No vendor, no community forum, no Stack Overflow corpus. On-call engineers debugging a pagination defect read source directly with no upstream escalation path. That is a poor use of senior engineering time for a commodity feature.

Scaling — neutral to negative. The bundle governs presentation, not data access, so it contributes nothing to scale. Real scaling risks live below it: COUNT(*) over large/joined result sets, deep OFFSET scans on high page numbers, and unbounded perPage values. None are addressed by the package; all need an explicit internal standard (capped page size, keyset pagination for large tables, cached/approximate counts).

Failure modes to plan for:

  • Framework-upgrade deadlock — pins an EOL Symfony/Twig range and blocks the whole application's upgrade; highest-probability, highest-cost failure.
  • Silent mis-pagination — incorrect totals under GROUP BY/HAVING/DISTINCT produce duplicated or skipped rows across pages. Users notice before monitoring does.
  • View-layer drift — Twig major bumps changing escaping or inheritance, breaking rendering with no test coverage to catch it.
  • Template injection — pagination links built from request query strings are a classic reflected-XSS surface if escaping is inconsistent; unaudited code raises our burden of proof.
  • Bus-factor incident — the sole maintainer disappears and no one can triage an urgent defect.

Ramp-up. A Symfony developer: an afternoon — the API is conventional. A Laravel team: negative value. Engineers would learn a framework they do not otherwise use, in service of a feature Laravel already provides, in a skill discarded at the first refactor. Onboarding cost is not the constraint; the constraint is that the learning is non-transferable.

Recommendation. Do not adopt. This is a commodity feature wrapped in a framework-specific, effectively unmaintained, zero-adoption bundle that is architecturally incompatible with Laravel and redundant within Symfony. Close the ticket with a written pagination standard instead — cursor pagination for high-volume endpoints, a capped perPage, and Laravel's native paginator or Pagerfanta as the sanctioned implementation. Revisit only if a concrete, unmet requirement emerges that framework-native tooling provably cannot satisfy.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console