leek/git-debug-bundle
A Laravel package for Git-aware debugging that makes repository information available in your app, so you can quickly confirm the branch, commit, and code version you're running during development.
X-App-Commit response header, a /version or /health endpoint, and build-time commit injection from CI. Use this package as the argument for investing in the production-grade version, which pays off in incident response and QA sign-off, not just local ergonomics.APP_DEBUG and APP_ENV !== 'production', with URL redaction. Treat it as environment-scoped instrumentation, never a global feature.Consider it only as a design input, and only when:
.git and shell_exec/proc_open is permitted.Look elsewhere — and plan to build in-house — when:
DataCollectorInterface contract differ; there is no adapter to barryvdh/laravel-debugbar.Archived: yes and Dependents: 0 mean no bug fixes, no CVE response, no validation against modern PHP/Laravel..git is absent, or your container policy disables process execution — the bundle's core mechanism degrades there.Recommended path: a ~one-week internal laravel-git-debugbar package — a single DataCollectorInterface collector plus a service provider gated on config('app.debug') — reading a CI-injected commit SHA, batched into one git status --porcelain=v2 --branch call via Symfony\Component\Process\Process, failing silently when Git or .git is unavailable.
To executives: A narrow, low-cost developer-productivity improvement — not a platform dependency. The underlying pain is real: engineers sometimes can't tell which code version is deployed to a given environment, which burns debugging time and can invalidate QA sign-off. We are not adopting this specific package: it is archived, unmaintained, tied to an obsolete framework, and has 22 stars and zero dependents — the maintenance and security risk is disproportionate to the benefit. Instead we'll implement the same capability natively in roughly one engineering week, restricted to development and staging, and pair it with the release-tagging we already need for incident response. Cost: negligible; risk: low provided production exposure is blocked; payoff: faster environment triage and cleaner release verification.
To engineering: The idea is sound and cheap to replicate; the artifact is not. Do not add it as a dependency — Symfony2-only, archived, no patch path, no compatible collector contract on Laravel 10–12 / PHP 8.2+. Build a small internal collector registered via a provider guarded by APP_DEBUG, reading a commit SHA injected at build time (defaulting to "unknown"), rendering branch, short SHA, tag, dirty flag, and a redacted remote URL. Harden the failure modes: no git on PATH, missing .git in artifact deploys, detached HEAD in CI, disabled shell_exec/open_basedir, and Git's "dubious ownership" refusal in Docker bind mounts — degrade to "Git: unavailable," never throw inside a collector. Record the build-vs-adopt decision in a short ADR on day one so the archived-upstream lineage doesn't need re-litigating. If you only want the reference implementation, read the upstream collector for its field list; budget half a day for the spike, one to two days for the hardened version with tests.
How can I help you explore Laravel packages today?