dejwcake/advanced-logger
Advanced Logger is a Laravel/PHP package that extends the framework's logging with configurable channels, richer context, and structured output, making it easier to capture, organize, and review application events in development and production with minimal setup.
Architecture fit. This is a Laravel-native package providing request logging with a hash-based log customizer, a service, and a listener handler. Its shape — service class plus framework listener handler plus config-driven customizer — is idiomatic Laravel and fits a standard middleware/event-listener slot in our request lifecycle. There is no architectural conflict with a conventional Laravel app; the fit question is not whether it slots in but how much of our request pipeline we want it touching and what it does with the payloads it captures.
Integration feasibility. Low effort. Composer install, publish config, register the listener/middleware, set hashing rules. No service provider gymnastics implied by the release notes. The 2.0.1 changes are internal hardening and packaging hygiene, not integration work.
Technical risk. The release note claims "nothing to do when upgrading," and for the median consumer that is probably accurate — but the claim is not universally true and should not be taken at face value:
final is a breaking change in disguise. Any consumer that subclasses RequestLogger, RequestLoggerService, HashLogCustomizer, or RequestLoggerListenerHandler will fatal on upgrade. More common in practice: test suites that mock these classes (Mockery/PHPUnit cannot mock final classes) will break, and the failure will surface as test errors, not as an upgrade error. This is the single highest-likelihood upgrade incident.readonly requires PHP 8.2+. Declaring readonly class silently raises the package's effective minimum PHP. If we are on PHP 8.0/8.1 anywhere in the fleet, 2.0.1 is not installable and Composer will resolve us back to an older tag — a silent version skew rather than a loud failure.readonly also removes post-construction mutability. If any integration mutates logger/config state after instantiation (setters, reflection, container rebinding tricks), behavior changes.final readonly is arguably a major-version event. Delivering it in a patch release means we cannot rely on the version number alone to signal risk; we must verify ourselves.export-ignore for tests/Docker/QA config only affects dist installs and only matters if we run the package's own test suite in our pipeline or vendor the source. phpmd 3 and CI coverage are contributor-facing only. AGENTS.md/CLAUDE.md are noise for us.Net: risk is low but concentrated in test infrastructure, and the release notes understate it.
Key questions.
extends any of the four newly-final classes anywhere in our codebase or in test doubles? (Grep for extends RequestLogger, Mockery::mock(RequestLogger, createMock(.)HashLogCustomizer hashing satisfy our PII/redaction requirements, and is that behavior stable across this release (notes say no behavioral change — confirm)?Stack fit. Standard Composer package for Laravel; no non-PHP runtime dependencies introduced. The move to final readonly signals the maintainer is tightening the object model — a good sign for long-term stability, but it means our integration must consume the package through configuration and container bindings, not inheritance. Treat the four classes as internal implementation from here on.
Migration path. We have no prior assessment, so 2.0.1 is our baseline rather than a migration. If any environment is already on 2.0.0, the upgrade is a composer update plus the verification steps below. Given the final/readonly changes, pin explicitly ("^2.0.1") rather than floating, and let Renovate/Dependabot surface 2.x patches for review rather than auto-merging — the patch-level BC break here is the justification.
Compatibility. Two hard gates before adoption:
final decisions.Sequencing.
extends/mock/createMock against the four class names; fix any hits by introducing the adapter or switching to interface-based fakes.--prefer-source).Maintenance. Low. Patch releases appear to be hygiene-focused, the maintainer is investing in QA tooling (phpmd 3, coverage reporting, agent docs), and the dependency surface is small. The main ongoing cost is upgrade diligence: because BC-affecting class-model changes shipped in a patch, we should read notes rather than trust semver. Budget a short review per release, not a full re-evaluation.
Support. Single-maintainer-style risk profile is typical for packages of this size; no commercial backing implied. Mitigation is the adapter layer — if the package stalls, we can swap or vendor it without touching call sites. Ensure someone owns the upgrade path; an unowned logging package that silently accumulates CVEs or PHP-version incompatibility is a slow-burning problem.
Scaling. The dominant operational variable is log volume and payload size, not CPU. Request logging scales linearly with traffic and can dominate log storage/ingest cost — hashing does not reduce volume, it only reduces sensitivity. Plan for sampling or path-based exclusion at moderate-to-high RPS, and confirm the write path is buffered/async so a slow log sink cannot add latency to every request. Watch for large request bodies being captured wholesale.
Failure modes.
final class fatals on subclassing; broken test doubles; PHP-version resolution silently downgrading the package. All caught pre-merge if the verification sequence above is followed.--prefer-source when debugging.Ramp-up. Minimal for a Laravel developer — config file plus a listener registration. The learning curve is in the redaction semantics of HashLogCustomizer, not the API. Onboarding should cover: which fields are hashed, why, how to add a field, and how to verify a change. Write that down once; it is the artifact that prevents the quiet PII failure above.
How can I help you explore Laravel packages today?