kendrick/symfony-debug-toolbar-git
Adds Git context to the Symfony debug toolbar, showing the current branch, commit hash, and working tree status right in your development toolbar so you can confirm which code version you're testing without leaving the browser.
What the package actually is. kendrick/symfony-debug-toolbar-git is a Symfony bundle — not a Laravel package. It registers a DataCollector (tagged data_collector in the container) that shells out to git log -1 during a request and renders the latest commit hash, branch, author, and message into the WebProfilerBundle toolbar via a Twig template that overrides/blocks into @WebProfiler/Collector/*.
Architecture fit: poor. Laravel does not mount symfony/web-profiler-bundle in its request lifecycle. Laravel's equivalent surface is barryvdh/laravel-debugbar, which uses its own collector contract (Barryvdh\Debugbar\DataCollector\...) and its own renderer. This package's core value — the Symfony toolbar panel — has no host to attach to in a Laravel app. Installing it would pull in Symfony bundle classes that never boot.
Integration feasibility: low. A port is technically trivial (the real logic is roughly 60–100 lines: run git, parse stdout, expose an array), but that is an argument for reimplementing, not for adopting this package. As shipped, it cannot be wired in without forking.
Technical risk: high.
kendrick/, repository owner is kendrick-k. That is plausible but should be confirmed before any autoload of third-party code.Key questions for the team.
.git and a git binary? Default production images usually ship neither.app/Support rather than vendor/.Stack fit: none as-is. Laravel 9/10/11 + barryvdh/laravel-debugbar is the target surface. The Symfony bundle's service definitions, Twig namespace, and toolbar injection point are all incompatible.
Recommended path: reimplement the concept, do not install the package.
app()->isLocal()) and exposes a commit panel. This preserves the original UX with zero third-party surface.GIT_COMMIT / GIT_BRANCH / GIT_COMMIT_MESSAGE as environment variables in CI, expose via config('app.commit'), and render in a Blade partial or the debugbar's built-in "messages"/variables panel.Migration path. None required — there is no existing install base of this package in our estate (0 dependents). Treat this as greenfield: a small internal helper with our own ownership, our own tests, and our own release cadence. If we later want to swap the source of truth from git to a CI artifact, the collector interface stays stable.
Compatibility. If we insist on the upstream package despite everything above: PHP 7.1–7.4 and Symfony 3.3–4.x are the realistic envelope. That is not a supported combination for a current Laravel app. Any attempt to force it in will require --ignore-platform-reqs, which is a red flag on its own.
Sequencing.
.git is absent, so the collector degrades quietly.Maintenance: unacceptable as a dependency, trivial as a port. A 2018 bundle with a single maintainer and no dependents will not receive Symfony 6/7 or PHP 8.x patches. Vendoring it means we own it anyway; writing the equivalent means we own ~100 lines we understand. Choose the latter.
Support. No upstream support channel, no issue triage cadence, no security response. MIT license is permissive and low-friction, but permissive is not the same as maintained. If Security scans flag abandoned packages (they typically flag "no release in 24+ months"), this will land on an exception list indefinitely.
Scaling. Negligible throughput concern in practice because the collector is dev-only; but the pattern is worth naming. Forking git per request is O(10–50ms) plus process overhead, and it degrades on large repos and on network filesystems. Unbounded, uncached invocation in a shared dev/staging environment with N developers produces visible latency and noisy process tables. Cache the result per process and gate it behind isLocal().
Failure modes to design for.
.git absent (typical for docker build without the directory copied) → collector must return "unavailable," not throw.git binary absent in the runtime image → same..git (www-data vs. build user) → silent catch + log-once.git log, or a safe.directory ownership complaint on recent git versions → timeouts and confusing stderr leakage into the panel.enabled config flag, not just APP_DEBUG.Ramp-up. Low. Any PHP developer can read and reproduce this in an afternoon; the domain knowledge (how the debug bar registers collectors) is the only learning curve, and it is documented for laravel-debugbar. This is the strongest argument in the package's favor: the concept transfers cheaply even though the artifact does not.
Verdict. Do not adopt. The package is a 30-star, single-maintainer, seven-year-stale Symfony bundle with zero dependents, and our stack is Laravel. Take the idea — commit identity in the dev toolbar — and spend one engineer-day implementing it natively with a deploy-time env var as the source of truth. That gets the same developer experience with none of the abandonment, compatibility, or supply-chain exposure.
How can I help you explore Laravel packages today?