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

Doctrine Pagination Bundle Laravel Package

javihgil/doctrine-pagination-bundle

A Symfony bundle that adds simple pagination for Doctrine queries, helping you split ORM and DBAL results into pages with a reusable paginator service. Ideal for building paged listings, search results, and admin grids without writing custom limit/offset logic.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — fundamental mismatch. Despite being filed as a Laravel/PHP package, this is a Symfony bundle. Its entire delivery mechanism is Symfony-specific: a Bundle subclass registered via config/bundles.php, a DependencyInjection\Extension with a configuration tree, and service definitions loaded from YAML/XML. Laravel has no bundle, compiler-pass, or DI-extension concept, and Composer package discovery (extra.laravel.providers) will find nothing to register. The package will install into a Laravel app (Composer does not care) but none of its services will ever be wired, producing class-not-found errors at first use. Even the underlying doctrine/dbal presence in Laravel (used for schema operations) does not help — that is DBAL, not ORM bundle infrastructure.

Value proposition overlap. The core function is nearly redundant in both ecosystems:

  • Doctrine ships Doctrine\ORM\Tools\Paginator with HINT_ENABLE_DISTINCT.
  • Laravel ships LengthAwarePaginator, CursorPaginator, and a query-builder paginator.

The bundle's only plausible differentiator is ergonomics: request ?page=/?limit= parsing into a paginated result value object, and possibly a Twig helper. That is roughly 100–150 lines of code, not a dependency.

Integration feasibility.

Target runtime Feasibility Effort
Symfony 3.4–5.x + Doctrine ORM 2.x Drop-in, minutes Trivial
Laravel 10/11 + PHP 8.2/8.3 Not feasible as-is; port required 1–2 engineer-days + tests written from scratch
Symfony 6/7 + Doctrine ORM 3.x Likely blocked by constraints Needs a fork

Technical risk. This package carries an unusually clean negative signal: 0 stars, 0 dependents, last release 2022-12-20, score 0. Zero dependents means no field validation of correctness or edge cases anywhere in the wild — we would be the only production consumer. The intrinsic attack surface is low (no auth, crypto, or deserialization), but an unmaintained transitive dependency is still unpatchable by definition. The realistic risks are dependency-resolution lock-in (pinning us below a PHP/Symfony/Doctrine upgrade) and silent correctness bugs in COUNT handling.

Key questions (one is blocking).

  1. What is the actual target runtime — Laravel or Symfony? The brief says Laravel; the package says Symfony. Every downstream decision depends on this answer.
  2. What are the composer.json constraints for php, symfony/*, and doctrine/orm, and do they resolve against our target matrix?
  3. What specific capability do we need that native Doctrine\ORM\Tools\Paginator plus Laravel's LengthAwarePaginator do not already provide?
  4. Is there a maintained alternative already covering this (BabDevPagerfanta, KnpPaginatorBundle, or a first-party adapter) with a real release cadence?
  5. If we port it, who owns the fork and what is the security-patch path?

Integration Approach

Stack fit. Poor for the stated stack. If the real destination is a Symfony application, fit is good but the package competes with actively maintained paginators that have Symfony 6/7 and Doctrine ORM 3 support. If the destination is Laravel, fit is effectively zero without a fork.

Migration path. Do not migrate to this package; migrate past it.

  • Laravel + Doctrine: use doctrine/orm (optionally laravel-doctrine/orm), wrap Doctrine\ORM\Tools\Paginator, and adapt to LengthAwarePaginator via AbstractPaginator::resolveCurrentPage(). Small, testable, ours.
  • Symfony app being ported to Laravel: reimplement the equivalent adapter. The bundle has no behavior worth carrying across a framework boundary.
  • Symfony staying Symfony: prefer a maintained paginator bundle and use this one only if a specific ergonomic feature cannot be replicated cheaply.

Compatibility. Assume the constraints target PHP 7.x–8.0, Symfony ≤5, and Doctrine ORM ≤2.14. Doctrine ORM 3.0 (2024) changed paginator and query-building APIs; expect this package to fail resolution. Verify with composer why-not before any spike.

Sequencing.

  1. Resolve Q1 (stack) — blocking; do not spend further time until answered.
  2. Constraint spike (~4h): composer require against a throwaway skeleton at our target PHP version; record the exact conflict output. This is cheaper than reading the source.
  3. Decide build-vs-adopt: if Symfony, benchmark against BabDevPagerfanta; if Laravel, close the ticket as "not applicable" and open an in-house adapter task.
  4. Implement the adapter in-house with explicit tests for count-with-fetch-join, DISTINCT, deterministic ordering, and empty-result pages.
  5. Only if a bespoke behavior must be preserved, fork into an internal VCS/path repository, pin it, and assign a named owner before the first deploy.

Operational Impact

Maintenance. No release cadence since December 2022, no evidence of an active maintainer, and likely no CI-backed test suite. Adopting it converts a dependency into an owned asset: assume ~15–25% of one backend engineer's year in the first twelve months, almost entirely dependency bumps and compatibility shims.

Support. GitHub issues only — no SLA, no commercial backing, no vendor to escalate to. Institutional knowledge will be one engineer who has read a few hundred lines of PHP.

Scaling. Offset/limit pagination is inherently O(offset) in the database. The COUNT(*) query is the usual bottleneck on large or heavily joined datasets, and HINT_ENABLE_DISTINCT can force temp tables on MySQL/Postgres. Below ~100k rows this is invisible; above ~1M rows expect p95 latency cliffs regardless of which paginator we choose. Memory is bounded by page size and is safe. The scaling answer is cursor/keyset pagination on our largest tables — a decision this package cannot make for us.

Failure modes.

  • Silent DI failure (Laravel): package installs cleanly, services never register, runtime ClassNotFoundError in production.
  • Upgrade deadlock: constraints block PHP or Doctrine upgrades; the fix is a fork under time pressure.
  • Incorrect totals: fetch-joined collections multiply rows, inflating COUNT; pagination UI shows wrong page counts and tests won't catch it without deliberate fixtures.
  • Page drift: non-deterministic ORDER BY combined with OFFSET skips or repeats rows across pages — a data-integrity-looking bug reported by users, not monitoring.
  • Unpatchable CVE: low likelihood given the surface, but the remediation path is "fork it ourselves," which is not a plan.

Ramp-up. The source is small enough for an engineer to read end-to-end in under an hour. Onboarding cost is not comprehension — it is the unanswered ownership question and the absence of any upstream to lean on.

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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource