buggregator/trap
Buggregator Trap transforms PHP debugging: drop-in Symfony VarDumper extensions, helper functions for any Buggregator server, and a lightweight local server that needs no Docker. Install as a Composer dev dependency; pairs with the Buggregator PHPStorm plugin.
composer require --dev then vendor/bin/trap means a new engineer can inspect payloads in minutes. This is a direct lever on ramp-up time for Laravel/Symfony teams.mail-to-file sender (per-recipient JSON folders) makes transactional-email work — password resets, receipts, multi-recipient notifications — testable without a real inbox. This supports scoping email-dependent features earlier in a roadmap.google/protobuf; it shortens debugging cycles on API-contract work.console, server, file, mail-to-file) let you choose persistence-per-environment, which is useful for reproducing bug reports rather than asking "what did your dump say?" Since 1.18.0, trap run reports startup errors and exits non-zero, which makes it usable as a gate in CI scripts rather than a silently-failing step.Consider it when:
dump()/VarDumper, Monolog, or Ray — Trap upgrades existing habits rather than replacing them. Teams still on PHP 8.1 must either stay on 1.17.x or defer adoption; treat the 8.2 requirement as a cost item if it forces a runtime upgrade ahead of your platform schedule.depth(), times(), once(), if(), stackTrace(), tr()/td()) to keep noisy debugging sessions readable. Timing deltas now report correct minutes for long-running requests, so tr() is trustworthy on slow endpoints and queue workers.sdk key), so it is materially more dependable than at the prior review — but see the maturity caveat below.Look elsewhere, or defer, when:
127.0.0.1 as a security decision, not a config tweak.--ui is described in the README as a feature in development; do not build demo or training workflows that depend on it.Adoption hygiene if you proceed: pin the version (note the 1.17 → 1.18 PHP 8.2 floor when pinning), install with --dev (be aware -W loosens root constraint resolution during install), keep default loopback hosts, and verify the phar release path if you intend to use it in CI. The density of correctness fixes in the 1.15 → 1.18 window — Sentry envelopes, base64 body chunking, HTTP file restoration, exception types on malformed frames — is a good sign of active maintenance but also a signal that the ingestion edge cases are still being found; budget for periodic upgrades rather than a one-time install.
For executives — one paragraph. Buggregator Trap is a free (BSD-3), developer-only debugging tool for our PHP services. It removes friction from the most expensive part of engineering work — figuring out why something is wrong — by giving every developer a single local window into dumps, logs, HTTP payloads, outbound emails, and error reports, with no Docker and no infrastructure to run or pay for. It is a dev dependency: it ships to no customer, adds no runtime cost, and carries no hosting or licensing expense. The realistic upside is faster onboarding and less time lost to ad-hoc debugging setups; the risk is bounded because removal is a one-line Composer change. The one gate: the current release line requires PHP 8.2+, so confirm our runtime position before standardizing.
For engineering leads. Install is composer require --dev buggregator/trap; starting the server is vendor/bin/trap. 1.18.0 requires PHP 8.2 — check the floor against each service before rolling out, and hold PHP 8.1 projects on 1.17.x or upgrade deliberately. It enhances VarDumper automatically, so existing dump() habits improve with zero code changes, and trap()/tr()/td() add depth- and count-limiting that keeps large payloads readable. Choose senders per environment (-sconsole, -sfile, -smail-to-file) so local work stays ephemeral and CI can persist artifacts; trap run now exits non-zero on startup failure, so a broken capture step fails the build instead of being missed. If Composer conflicts arise, use the PHAR or Dload binary instead of touching the app's dependency graph.
For security and platform. Defaults bind to loopback; keep it that way. Never expose the trap ports on shared networks or long-lived CI hosts, treat captured dumps and mail spool files as sensitive developer data (they can contain credentials and PII — HTTP body and attachment capture make this more, not less, true), and exclude them from version control.
What we are explicitly not buying. No production observability, no retention or alerting, no support contract, and no reliance on the in-development web UI. If those become requirements, they are separate roadmap items — Trap stays in the developer's terminal.
How can I help you explore Laravel packages today?