gamma/api-logger-bundle
A lightweight logging bundle for APIs that captures requests, responses, and errors for easier debugging and monitoring. Helps trace issues across endpoints with minimal setup in Laravel/PHP applications.
Architecture fit — verify before anything else. The package name (gamma/api-logger-bundle) and the "bundle" suffix point to a Symfony DI bundle, not a Laravel package. Laravel has no bundle concept — no Bundle class registration, no compiler passes, no Symfony kernel event subscribers. If the library hooks kernel.request / kernel.response / kernel.exception, none of that fires inside Laravel's HTTP kernel. The only realistic reuse path is via a framework-agnostic seam: a Guzzle middleware (outbound) and/or a PSR-3 logger. That seam has to be confirmed by reading the source, not the README — the README is a one-liner and tells us nothing about transport hooks, storage backend, or configuration surface.
Functional scope (as described). "REST API request logging and profiling" typically means: capture inbound/outbound request metadata (method, URI, status, duration), optionally bodies, and persist to a file/DB/queue for later analysis. That is a commodity capability in 2024 — Laravel Telescope, Clockwork, spatie/laravel-activitylog, Guzzle log middleware, and OpenTelemetry PHP all cover it with maintained code. The package has to justify itself against free, first-party alternatives.
Integration feasibility: low to medium, and gated on an audit. Three discrete questions determine everything:
composer.json allow PHP 8.x and Guzzle 7, or is it pinned to php: ^7.0 / symfony/*: ^3|^4 / Guzzle 6? A Guzzle 6→7 ClientInterface signature change alone can break middleware silently or fatally.Technical risk — high, and concentrated in three areas.
mcrypt, create_function, dynamic property deprecations, and untyped ArrayAccess return signatures to surface during a trial install.Authorization tokens, cookies, passwords, and PII. With no security-response process and no maintainer, any vulnerability is permanently yours. This is a GDPR/PCI conversation before it is an engineering one.Key questions to put to the repo before committing engineer time: What does composer.json actually constrain? Is there a test suite and CI? Does it log bodies by default, and is there a redaction/allow-list mechanism? Where does it write — synchronous DB insert, file append, or queue? Is there sampling? Is the Symfony coupling in the core or only in the bundle wrapper? Is there a tagged release artifact, or only dev-master?
Stack fit. Target is presumably Laravel 10/11 on PHP 8.2/8.3. On the current evidence this package does not "fit" that stack — it would need to be adopted, not installed. Treat the Composer dependency as unavailable until an install spike proves otherwise; --ignore-platform-reqs is not a production strategy.
The one viable path: fork-and-vendor. Assume no composer require success. Plan for:
path or VCS repository so the dependency is immutable and reviewable.Http facade is Guzzle-backed, so outbound instrumentation ports cleanly and is the highest-value, lowest-risk seam. Discard the Symfony bundle class, DI extension, and compiler passes entirely.Http::globalMiddleware() or a Guzzle handler-stack push. Configuration belongs in a publishable config/api-logger.php with env-driven toggles and a sampling rate.Compatibility work is non-trivial and front-loaded. Expect to spend the majority of effort on PHP 8 uplift and on replacing whatever logging abstraction the package assumes with PSR-3 / Laravel's Log facade.
Sequencing (two-week gate before any production commitment):
composer.json, tests. Confirm whether a Guzzle or PSR-3 seam exists. If there is no clean seam, stop.Maintenance — you are the maintainer from day one. There is no upstream to defer to: no release cadence, no issue triage, no one to escalate a CVE to. Budget a standing allocation (realistically 2–4 engineer-days per quarter) for PHP/Laravel upgrade compatibility and dependency bumps, plus the unplanned spike the next major Laravel release will cause. Assign a named code owner and record the fork SHA in the repo — "where did this come from and why" is the question that gets asked two years from now.
Support. Zero stars and zero dependents means zero community: no Stack Overflow answers, no blog posts, no one who has debugged this before. Onboarding is entirely internal documentation, and the team inheriting it will be reading unfamiliar code with no reference material. A short runbook (where logs go, how to disable, how to rotate, what the sampling knob does) is not optional — it is the mitigation for the bus-factor risk.
Scaling — this is a cost center that grows with traffic, not with value.
Failure modes to design against explicitly:
Ramp-up. The code volume is likely small, so reading it is fast — but with no documentation, no tests, and no community, the ramp-up cost is concentrated in reverse-engineering intent and in the fork's provenance. Plan for one engineer-day of documentation before handoff.
Recommendation. Do not adopt this as a dependency. Run the two-day audit; if a clean Guzzle or PSR-3 seam exists, treat the package as reference source and reimplement the needed behavior as a first-party, tested, redaction-aware component. If no clean seam exists, close it out and adopt Telescope or OpenTelemetry PHP instead. The abandoned upstream, absent community, and 2018-era PHP constraints are not risks to be managed — they are the entire profile of the package, and the build-vs-fork calculus favors build.
How can I help you explore Laravel packages today?