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

Xhprof Buggregator Bundle Laravel Package

iluckhack/xhprof-buggregator-bundle

Symfony bundle that integrates XHProf profiling with Buggregator, helping you collect and inspect PHP performance profiles in a centralized debugging dashboard. Useful for local profiling and performance troubleshooting.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — the headline issue

  • This is a Symfony bundle, not a Laravel package. It integrates via Symfony's Bundle + DependencyInjection\Extension + Configuration tree + Resources/config/services.yaml mechanism. Laravel has no bundle registry, no compiler passes, and no config/packages/*.yaml — Laravel's use of Symfony components (HttpFoundation, Console, Process) does not extend to the FrameworkBundle/bundle system.
  • Practical consequence: composer require iluckhack/xhprof-buggregator-bundle into a Laravel app yields an inert package. Nothing auto-wires. Reuse is copy-adapt of the payload/profiler classes, not a drop-in.
  • The functional core is small and self-contained: start/stop XHProf around a request lifecycle and POST the profile to a Buggregator server. That makes a Laravel port tractable (est. 1–3 engineer-days including tests), but it also means the package itself is not the value — the value is the ~150-line idea.

Integration feasibility

  • Symfony: high fit, drop-in, well-matched to intent.
  • Laravel: medium-to-low fit. Three viable paths, in ascending cost: (a) reimplement as a terminable middleware + HTTP client; (b) fork under MIT and repackage as a ServiceProvider with a published config file; (c) treat this repo as a reference implementation only.
  • The real dependency is not the package — it's the XHProf PHP extension, which must be compiled into every image/developer machine and is ABI-coupled to the PHP minor version. That is the integration gate, not Composer.

Technical risk

  • Abandonment risk: high. 7 stars, 0 dependents, a single maintainer, last release 2024-03-04, composite score 0.035. The moment you depend on it, you own it.
  • Upstream XHProf risk: high. PECL xhprof is effectively stale; PHP 8.2/8.3 support typically requires the Tideways tideways_xhprof fork or a pinned build. Any PHP upgrade is a rebuild-and-revalidate event.
  • Protocol coupling: medium. The bundle encodes Buggregator's xhprof ingestion contract. Buggregator server upgrades and this package are versioned independently — no compatibility matrix exists.
  • Scope risk: low but real. This is dev-time tooling. If it ever leaks into production request paths without a kill switch, it is a latency and data-exposure incident.

Key questions to answer before committing

  1. Is profiling an actual gap, or do Xdebug / Laravel Telescope / Blackfire already cover it? (Opportunity score of 16.09 suggests unmet need in the ecosystem broadly — not necessarily in our stack.)
  2. Which PHP versions and base images are in scope, and can we standardize an xhprof build for all of them?
  3. Is Buggregator already adopted by the team, or does this introduce a second new tool?
  4. Dev-only, or do we want sampled production profiling? (Recommendation: dev-only for v1.)
  5. Has the author published a Laravel-oriented sibling repo we should check before forking?

Integration Approach

Stack fit

  • Assumes Laravel 10/11 on PHP 8.2/8.3. Laravel's Symfony-component usage does not give us bundle support; plan for a native Laravel surface: a ProfilingServiceProvider, config/profiling.php, a TerminableMiddleware, and an env gate (PROFILING_ENABLED).
  • Transport should use Laravel's Http facade (Guzzle under the hood) rather than the bundle's Symfony-typed HTTP client so the port stays idiomatic and testable with Http::fake().

Migration path (recommended order)

  1. Spike first, decide second (2–3 days). Stand up docker-compose with Buggregator + a PHP image carrying tideways_xhprof. Confirm the ingestion endpoint and payload schema by reading this bundle's source — it is small enough to read end-to-end in an hour.
  2. Build a thin internal package rather than adopting this one: middleware + payload builder + config + Http::fake tests. Use the bundle as the reference for the wire format; keep the MIT attribution.
  3. Only fork this repo if a Symfony service is also in the estate and we want one shared contract; otherwise the fork is dead weight.

Compatibility concerns

  • Pin the PHP image tag and the xhprof build together; treat them as a single unit.
  • Pin the Buggregator server image version alongside the client payload code.
  • Guard every entry point with extension_loaded('xhprof') || extension_loaded('tideways_xhprof') and no-op cleanly.

Sequencing

  1. Validate need with the platform team; confirm dev-only scope and a named owner.
  2. POC in one low-risk service; measure overhead and onboarding friction.
  3. Decision gate: adopt internal package / fork / abandon.
  4. Roll out via private Composer repo + a one-page runbook + docker-compose template.
  5. Review at 90 days against a usage threshold; kill it if adoption is below the bar.

Operational Impact

Maintenance

  • Effectively zero upstream leverage: 7 stars, 0 dependents, one maintainer, no release in over a year. Budget for internal ownership from day one — the fork/internal package is our code, not a dependency.
  • MIT license is permissive; forking and republishing internally is legally clean. Keep the LICENSE and attribution.

Support

  • No vendor, no SLA, no compatibility guarantee. Issues filed upstream are unlikely to be triaged. Escalation path is "the engineer who wrote the port."

Scaling

  • Profiling overhead while enabled is materially higher than baseline (XHProf's own instrumentation plus serialization). Restrict to local and ephemeral environments; never leave it on by default.
  • Buggregator is a stateful server: profiles accumulate. Set a retention policy and a disk cap, and treat it as disposable infrastructure (no backups needed).
  • If sampled production profiling is ever required, cap the sample rate hard and route through a dedicated toggle that fails closed.

Failure modes and mitigations

  • Buggregator unreachable → must never fail the request. Fire-and-forget with a short timeout (~200ms), wrapped in try/catch, in terminate() after the response is sent.
  • Extension missing / PHP upgrade → silent no-op via extension_loaded guard; CI check that fails loudly if the extension is expected but absent.
  • Oversized payloads → cap profile size and skip serialization beyond a threshold.
  • PII / secret leakage → profiles contain SQL, request bodies, headers, and session data. Dev-only by policy, never pointed at a shared or internet-reachable host, documented as sensitive in the data-classification register.
  • Silent abandonment → monthly dependency-health check; if the internal package is adopted, upstream staleness is irrelevant.

Ramp-up

  • Low but non-zero: ~0.5 day per engineer to learn the Buggregator UI and the compose workflow, plus ~0.5 day to write the runbook. XHProf's callgraph/flame output is a different mental model from Xdebug and needs a short internal walkthrough.
  • Onboarding cost is the hidden tax: every new dev machine and every CI image needs the extension built. Weigh that against the debugging hours saved; for a team already fluent in Xdebug, the marginal value of this stack is questionable.
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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums