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

Symfony Debug Toolbar Git Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • Abandoned. Last release 2018-01-08; targets the Symfony 3.4/4.0 era and PHP 7.x. Twig template inheritance in WebProfilerBundle changed materially in Symfony 5/6, so even a Symfony host would likely break on render.
  • Unvetted. 30 stars, 0 dependents, single maintainer, no evidence of CI or test coverage. No downstream code has exercised this in a real deployment.
  • Provenance check needed. Package vendor is kendrick/, repository owner is kendrick-k. That is plausible but should be confirmed before any autoload of third-party code.
  • Execution surface. It invokes an external process per request. In dev-only context this is acceptable; anywhere else it is a latency and injection consideration (argument construction, working directory, output escaping in the template).
  • Opportunity signal is weak (score 0.52, opportunity 12.77). Low adoption upside means low community pressure to keep it alive and low likelihood of a maintained fork appearing.

Key questions for the team.

  1. Is the goal "show commit info in a dev toolbar" or "surface build/commit identity in staging and prod"? Only the first is in scope for this package; the second needs a deploy-time env var, not a request-time git call.
  2. Which debug bar does our Laravel version actually use, and does it already expose a custom-collector extension point we can use?
  3. Do our container images ship .git and a git binary? Default production images usually ship neither.
  4. Are we willing to own this code long-term? If yes, the fork is ~1 file and can live in app/Support rather than vendor/.

Integration Approach

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.

  • Option A (preferred, ~1 day): Write a custom Laravel Debugbar collector that resolves commit metadata once (lazily, cached per process, guarded by app()->isLocal()) and exposes a commit panel. This preserves the original UX with zero third-party surface.
  • Option B (cheapest, ~1 hour): Skip the toolbar entirely. Inject 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.
  • Option C (Symfony hosts only, if we have any): Fork the collector class, drop the 2018 Twig template, and reimplement the panel against the current WebProfilerBundle layout. Budget a half-day for template churn.

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.

  1. Confirm which environment(s) need commit visibility (local only vs. staging).
  2. Decide env-var (deploy-time) vs. git-call (request-time) as the source of truth. Env-var is correct for staging/prod.
  3. Implement Option B first; it satisfies 80% of the need at near-zero cost.
  4. Add the debugbar collector (Option A) only if local DX is a recurring complaint.
  5. Add a smoke test asserting the panel renders when .git is absent, so the collector degrades quietly.

Operational Impact

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.
  • Detached HEAD in CI → branch shows a SHA; display "detached" explicitly rather than a meaningless ref.
  • Permission errors on .git (www-data vs. build user) → silent catch + log-once.
  • Repo with slow git log, or a safe.directory ownership complaint on recent git versions → timeouts and confusing stderr leakage into the panel.
  • Accidental enablement outside local → the only real risk of consequence. Guard with an explicit enabled config flag, not just APP_DEBUG.
  • Output escaping: commit messages are free text and may contain angle brackets; the panel must escape.

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.

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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin