unreal4u/dummy-logger
A lightweight dummy logger for Laravel and PHP that implements the logging interface while discarding every message. Ideal for tests, benchmarks, and environments where you need a silent, zero-overhead stand-in for a real PSR-3 logger without changing existing code.
LoggerInterface but must work with zero configuration, we need a default that never writes, never throws, and never requires the consumer to install Monolog. That is the legitimate use case behind this package.Log::spy() or a mock, so this is a narrow benefit.)What changed in v1.0.1: the release moves development packages out of the consumer-facing require block, so downstream installs no longer pull test tooling. That is a genuine packaging-hygiene fix — it shrinks the transitive dependency footprint and removes the most obvious supply-chain objection — but it changes no behavior, adds no feature, and does not touch interface signatures or PHP version constraints.
Recommendation: Do not adopt as a Composer dependency. Use Psr\Log\NullLogger (ships with psr/log itself) or copy the pattern into an internal class. The dependency-footprint objection is now weaker; the redundancy and maintenance objections are unchanged.
Consider it only if all of the following hold:
psr/log's NullLogger is unavailable or unsuitable in your constraint set — which is rare, since it has existed since psr/log 1.0.Adoption criteria to check before any use:
composer.json-only patch; verify it installs cleanly on PHP 8.1+ and alongside current psr/log versions. Expect composer require conflicts. The release notes give no indication this was tested on modern PHP.psr/log v2/v3 signatures (return types on log(), LoggerInterface typing). A 2018 implementation likely targets v1, and a dev-dependency cleanup does not change that. This remains the most likely blocker.Look elsewhere when:
Monolog\Handler\NullHandler, or use Log::spy() in tests. No third-party package needed.For executives: This is a tiny, single-purpose utility that implements a standard logging interface but discards every message. It has no business logic, no feature surface, and no strategic value — it exists only so a library can accept a logger without forcing one on its users. The recent v1.0.1 release is a housekeeping patch that stops shipping test tooling to consumers; it is not a sign of renewed investment. The package still has three stars, no downstream dependents, and a single maintainer who made one small commit after seven years of silence. Adopting it would add a third-party dependency, a maintenance review, and a future migration for roughly twenty lines of code. Recommendation: do not add the dependency; replicate the behavior in-house or use the null logger already shipped in the PSR-3 standard.
For engineering: The package is a PSR-3 no-op logger. psr/log already provides Psr\Log\NullLogger, which does exactly this and comes in with a dependency you almost certainly have anyway. v1.0.1 only moves dev packages out of require — useful, because the old manifest would have dragged PHPUnit-era tooling into our install graph, but it says nothing about runtime compatibility. The implementation still predates PSR-3 v2/v3 return types, so expect signature mismatches and possible constraint conflicts on PHP 8.1+. If we evaluate it at all, do so with a throwaway Composer script that resolves against our actual psr/log version before anyone spends review time. In Laravel, use a Monolog NullHandler channel or a mocked facade in tests. If we genuinely need a bespoke default, a small internal NullLogger class costs less to write and review than an external dependency, and it keeps our supply chain and Composer graph clean.
Bottom line: Low value, low risk, and now slightly cleaner packaging — but still no reason to exist alongside Psr\Log\NullLogger. Decline adoption; use the standard library equivalent.
How can I help you explore Laravel packages today?