drew/debug-statements-fixers
Laravel Pint fixers that automatically detect and remove leftover debug statements such as dd(), dump(), var_dump(), print_r(), and ray() from your PHP codebase. Easily keep commits and production code clean, consistent, and free of accidental debugging calls.
var_dump, print_r, dd, dump, and similar leftovers before they reach customers.Consider it — or, more precisely, the pattern it encodes — when:
dd/dump misuse) to hand to engineering, whether or not the package is installed.Look elsewhere — or write the rule yourself — when:
dd, dump, ray(), VarDumper, Blade templates, and tinker artifacts. A generic fixer list misses the cases that actually bite Laravel teams.error_log usage, per-directory exceptions, autofix vs. fail-the-build — which a stale package won't provide.Also verify Packagist provenance for the drew/... package name against the upstream akovalyov/DebugStatementsFixers repository before adding any dependency — the namespace mismatch is a supply-chain question, not a formality.
One-liner: A whole class of trivial-but-embarrassing production bugs comes from leftover debug statements; the fix is a one-line CI check, and we should implement it in tooling we already maintain rather than adopt this specific 2018 package.
For executives: Low cost, immediate risk reduction. It prevents internal paths, query fragments, or user data from leaking through stray var_dump/dd calls, and prevents debug output from silently corrupting API responses. Delivered as a pipeline rule, it costs roughly one engineering day and has zero recurring spend.
For engineering: The upstream package is a reference, not a dependency — last release 2018, 22 stars, no dependents, no maintainer activity, and no demonstrated PHP 8 support. Recommendation: port the banned-function list into PHP-CS-Fixer/Pint (autofix in local hooks, hard-fail in CI), extend it with Laravel-specific offenders, and cover Blade and console entry points. Track it under the existing static-analysis workstream, not as a standalone project.
Ask: One engineer-day to land the rule plus hook, measured by (a) zero debug-statement findings in CI over 30 days and (b) no measurable increase in local commit friction. Revisit only if richer policy control is later needed, at which point Rector or a custom PHPStan rule is the better home.
How can I help you explore Laravel packages today?