sensiolabs/doctrine-query-statistics-bundle
A Symfony bundle that gathers Doctrine ORM query statistics and surfaces them in the web debug toolbar and profiler, making it easier to monitor query counts and execution times while spotting inefficient database access during development.
Headline finding: stack mismatch. Despite being catalogued as a "Laravel/PHP package," sensiolabs/doctrine-query-statistics-bundle is a Symfony bundle (it extends Symfony\Component\HttpKernel\Bundle\Bundle and registers a Profiler data collector). Laravel does not use Doctrine by default, has no Symfony Profiler, and therefore has no extension point this package can hook into. The relevance score (0.60) and star count (58) reflect generic "PHP" tagging, not actual Laravel applicability.
Architecture fit. Poor for a Laravel codebase. The package's sole function is to add a "Doctrine" tab to the Symfony Web Profiler showing query count, execution time, and parameters per request. In Laravel, the equivalent responsibilities are already covered natively by Laravel Telescope (query watcher), Laravel Debugbar, and Clockwork. Even inside Symfony, the functionality was largely redundant with DoctrineBundle's own DoctrineDataCollector, which ships the same tab out of the box.
Integration feasibility. Low. Practical blockers:
Technical risk. High relative to the value delivered. The capability is a developer-only diagnostic, so the blast radius of failure is limited — but the cost of adoption is a dead dependency in the lockfile, an unsupported code path, and a false sense of coverage (a profiler tab is not observability).
Key questions for the team.
doctrine/sql-formatter, Laravel Telescope, Debugbar, or Clockwork — that covers the requirement?Stack fit. Direct integration into Laravel is not viable. Recommendation: do not adopt unless the target application is a legacy Symfony 2.x/3.x service where the bundle is already installed.
If the stack is Laravel (the assumed context): treat this as a rejected candidate and substitute native tooling.
| Need | Recommended substitute |
|---|---|
| Per-request query inspection in dev | Laravel Debugbar or Clockwork |
| Query history, tagging, slow-query thresholds | Laravel Telescope query watcher |
Doctrine support (if using laravel-doctrine) |
DBAL SQLLogger / middleware + Telescope integration |
| Production query telemetry | APM (Datadog, New Relic, OpenTelemetry) with DB spans |
If the stack is legacy Symfony: the migration path is removal, not installation. DoctrineBundle's built-in profiler panel already surfaces query count, time, and parameters. The bundle should be dropped in favor of the native collector.
Migration path and sequencing.
composer.json/composer.lock and check for transitive requirements. Given zero dependents, removal is low-risk.Compatibility. Any attempt to force-install on PHP 8+ will require --ignore-platform-reqs or Composer constraint overrides, which introduces non-deterministic builds and should be treated as a release blocker.
Maintenance. Effectively unbounded ownership transfer. Archived means the adopting team becomes the de facto maintainer for any bug, PHP upgrade, or Symfony version bump. For a dev-only profiler tab, that is a poor trade: high ongoing cost, near-zero strategic value.
Support. No upstream maintainer, no issue triage, no security advisories. Internal support burden falls entirely on the platform team, competing with higher-value work.
Scaling. The profiler is a development-time tool and must never be enabled in production. If it were, per-request query capture imposes memory and CPU overhead proportional to query volume, and the profiler storage backend accumulates request profiles — a real risk of storage growth and latency on high-traffic services. Scaling concerns are therefore less about throughput and more about accidental enablement.
Failure modes.
Ramp-up. Trivial to learn (it is a read-only tab), which is precisely why the risk is under-estimated. The real ramp-up cost is organizational: convincing the team that the "quick win" of a profiler tab is not worth an unsupported dependency. Estimated onboarding for a developer: under an hour; estimated cost of ownership over a two-year horizon: materially higher than adopting Telescope, Debugbar, or the native Symfony collector.
Recommendation. Do not integrate. Score the package reject — archived, stack-mismatched, and functionally superseded. Redirect the underlying requirement (query visibility during development) to maintained, first-party tooling, and document the decision so the same candidate is not re-evaluated on star count alone.
How can I help you explore Laravel packages today?