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 Profiler Bundle Laravel Package

pixers/doctrine-profiler-bundle

Symfony bundle that enhances Doctrine profiling in the Symfony web profiler, letting you inspect executed SQL, bound parameters, timing, and backtraces to debug ORM and database performance.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Bottom line: this is a Symfony bundle, not a Laravel package. Adopting it as a dependency in a Laravel/PHP stack is not viable; the only realistic play is selective harvesting — reading its collector logic and reimplementing the useful parts as a Laravel-native tool — and even that has a low ceiling given strong built-in alternatives (Laravel Debugbar, Telescope, Clockwork, and DBAL's own middleware/logging).

Architecture fit — poor (high friction):

  • The package ships as a Symfony Bundle (PixersDoctrineProfilerBundle), meaning it depends on Symfony's bundle registration, DI container, event dispatcher, and typically the Web Profiler toolbar for its UI. Laravel has no bundle system; it uses service providers, middleware, and facades. There is no drop-in path.
  • It targets Doctrine ORM/DBAL, which is not the default Laravel data layer. Eloquent is the norm; Doctrine in Laravel requires a third-party bridge (e.g. laravel-doctrine/orm) and a team decision to maintain that integration.
  • Its value is largely the profiler UI (per-query timing, bindings, stack context rendered in the Symfony toolbar). In a Laravel app that UI is redundant with Debugbar/Telescope, so what remains is a thin query-collector — low residual value.

Integration feasibility — feasible only as a port, not an install:

  • Estimated effort to make it usable: 3–6 engineer-days to fork, strip Symfony coupling (container, kernel event listeners, Twig/toolbar templates), and re-expose the collector through a Laravel service provider + middleware or a custom DBAL middleware. That is likely more effort than writing a small collector from scratch.
  • Realistic "adopt" scenario is narrow: only if the app already runs Doctrine ORM inside Laravel and the team specifically wants the Pixers per-query breakdown view. That combination is rare.
  • 0 dependents and 47 stars is a strong negative signal: no downstream validation, no community-maintained forks, no compatibility shims.

Technical risk — high (mostly lifecycle, not correctness):

  • Last release 2019-09-14 (~6 years stale). Expect PHP 7.x-era syntax and constraints, Symfony 2/3/4-era APIs, and Doctrine DBAL 2.x. Modern runtimes (PHP 8.2+, Symfony 6/7, DBAL 3/4) are unlikely to be supported without patching.
  • DBAL API churn is the killer: DBAL 2.x's SQLLogger interface (the classic hook for query profiling) was deprecated in DBAL 3 and removed in DBAL 4, replaced by middleware. Any collector written against SQLLogger will not run on current DBAL — this is a rewrite, not a version bump, if the Doctrine stack is modernized.
  • Abandonment risk: no security-response process, no issue triage, and a likely single-maintainer bus factor. Vendoring it means inheriting all future patching.
  • Licensing is fine: BSD-3-Clause is permissive and fork-friendly, so IP/legal is not a blocker for code reuse with attribution.

Key questions for the team:

  1. Do we actually run Doctrine ORM in this Laravel app today, or is this hypothetical? (If Eloquent, stop here — the package is out of scope.)
  2. Which DBAL/Doctrine version and PHP runtime? If DBAL ≥ 3, the profiler hook must be rewritten.
  3. What does this give us that Debugbar's query panel, Telescope's query watcher, or Clockwork does not — specifically, the EXPLAIN view, the per-query stack trace, or the aggregated N+1 detection?
  4. Is the requirement the data (query timings in dev) or the UI? If data only, we can get it in ~1 day with existing tools.
  5. Is the maintainer reachable, and are we willing to own a fork indefinitely?

Integration Approach

Stack fit — mismatch by default; conditional fit in one scenario:

  • Eloquent-based Laravel app (the common case): do not integrate. Use Laravel Debugbar for per-request query breakdown, Telescope for historical/aggregate query inspection, and DB::listen() for custom instrumentation. These are maintained, Laravel-native, and cover the same ground.
  • Laravel + Doctrine ORM (via laravel-doctrine/orm): conditional. Here the Pixers collector's concepts are relevant, but the bundle wiring still must be replaced with a service provider and a middleware/DBAL middleware hook.

Migration path (if the conditional case holds):

  1. Fork, don't require. Vendor the repository under an internal namespace; pin the commit and record it in the dependency inventory. Do not add it to composer.json from Packagist — it will rot and trip composer audit.
  2. Excise Symfony coupling. Remove bundle class, DI extension, kernel event listeners, and toolbar/Twig assets. Keep only the query-collection and timing logic.
  3. Re-host in Laravel. Register a ProfilerServiceProvider bound to APP_DEBUG and a non-production environment gate; wire the collector to Doctrine's logging hook (DBAL 2 SQLLogger) or, for DBAL 3/4, implement it as a DBAL middleware wrapping the driver.
  4. Present via existing UI. Push collected queries into Debugbar's timeline/messages API or render a Blade partial; do not rebuild the Symfony toolbar.
  5. Rewrite on DBAL 4 if applicable. Treat the collection layer as new code (~200–400 LOC) rather than a port; the original becomes a design reference, not a base.

Compatibility notes:

  • If the app is on DBAL 2.x for legacy reasons, the collector may work near-verbatim — but DBAL 2 is itself EOL, so this is a short runway.
  • Expect to patch namespace/type-hint/PHP-8 incompatibilities during the fork regardless of DBAL version.
  • The EXPLAIN-plan rendering is the most distinctive piece; it may be worth reimplementing even if the rest is dropped, since Debugbar does not do it out of the box.

Sequencing:

  1. Week 1 — Validate need. Confirm Doctrine usage and enumerate the specific profiling questions the team cannot answer today. Kill the initiative if Debugbar/Telescope already answer them.
  2. Week 1 — Gap check. Prototype the target questions on existing tooling; measure how much remains unanswered.
  3. Week 2 — Time-boxed spike. Fork, strip, and get a single query captured in a dev environment. If the spike exceeds ~2 days, switch to writing a fresh DBAL middleware.
  4. Week 2–3 — Harden. Env gating, redaction of bindings, tests, docs.
  5. Ongoing — Own it. Assign a named maintainer; add to the internal dependency register with a review date.

Effort framing for the roadmap: ~3–6 dev-days for a fork-and-port, ~1–2 dev-days for a from-scratch DBAL middleware plus Debugbar integration, and ~0 days if existing tooling suffices. The package contributes design knowledge, not code, in the latter two paths.

Operational Impact

Maintenance — full ownership, no upstream:

  • Last release 2019, 0 dependents, 47 stars: treat as abandoned. Once forked, we are the maintainers. Every future PHP, Symfony, DBAL, or Doctrine upgrade is ours to absorb.
  • The fork must be tracked in the internal dependency inventory with an owner, a review cadence, and a documented divergence from upstream.
  • Low code volume is the one mitigating factor: a small surface is cheaper to own than a large one, and BSD-3-Clause removes legal friction on forking.

Support — none:

  • No maintained issue tracker, no security-response channel, no SLA, no release cadence. Any vulnerability in the profiling path (e.g., query-binding leakage) is ours to find and fix.
  • Onboarding relies entirely on internal documentation we write; there is no upstream docs site, and the bundle's Symfony-specific setup instructions are actively misleading for a Laravel audience.

Scaling — dev-only by construction:

  • Query profiling is inherently a development/debugging concern. It should never be enabled in production: per-query collection, binding capture, and stack traces impose meaningful per-request overhead on query-heavy paths (dashboard pages, report endpoints, N+1-prone loops).
  • Enforce with an environment gate (APP_DEBUG + explicit allowlist), feature-flag it, and add a startup assertion that fails fast if enabled outside allowed environments.
  • Profiling data should be per-request and in-memory (or sampled and flushed to a local store); do not let it grow into a shared cache or database write path.

Failure modes:

  • Data exposure (highest severity): profiling output can surface raw SQL, bound parameters, table/column names, and possibly credentials embedded in DSNs or connection strings. Left on in production or in a shared staging environment, this is an information-disclosure incident.
  • Fatal errors on framework upgrade: a stale collector hooked into a removed DBAL interface will break the boot path of the app, not just the profiler — potentially taking down every request if the provider is not lazily gated.
  • Toolbar/asset conflicts: if any Symfony Web Profiler remnants are carried over, expect asset and route collisions with Laravel's own debug tooling.
  • Composer hygiene drift: pinning an abandoned package invites composer audit findings and blocks otherwise-routine dependency upgrades, creating pressure to cut corners elsewhere.
  • Silent inaccuracy: a collector written for DBAL 2 semantics may misreport timings or miss queries executed outside the hooked path, producing confident-but-wrong performance conclusions — worse than no data.

Ramp-up:

  • Using it (as a ported Laravel tool): low — the API surface is small and the output is a familiar query table; an hour of docs suffices for most engineers.
  • Owning the fork: medium — requires understanding of Doctrine's logging/middleware pipeline, Laravel's service-provider lifecycle, and safe env gating; roughly 2–3 days for a mid-level engineer.
  • Keeping it aligned with Doctrine upgrades: medium-to-high — the DBAL 2 → 3 → 4 transition is a genuine re-architecture of the hook point, and that is exactly where an abandoned collector will break.
  • The team's ramp-up cost on the underlying problem is unaffected by this package — Debugbar and Telescope are the faster on-ramp for the same questions.

Recommendation: do not add pixers/doctrine-profiler-bundle as a dependency. Use it as a design reference if the team needs per-query EXPLAIN output inside Doctrine, and otherwise standardize on Laravel Debugbar/Telescope/Clockwork. Opportunity score (12.28) and overall score (1.65) are consistent with a package that has niche historical value and near-zero forward-looking value for a Laravel stack.

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.
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
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource