PHPackages                             tombenevides/dump-linter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. tombenevides/dump-linter

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

tombenevides/dump-linter
========================

A custom rules to remove dump functions from PHP code

v1.0.2(3y ago)18.9k↓13.6%MITPHP

Since Jan 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/tombenevides/dump-linter)[ Packagist](https://packagist.org/packages/tombenevides/dump-linter)[ RSS](/packages/tombenevides-dump-linter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (4)Used By (0)

[![](https://camo.githubusercontent.com/eb95f26475c942c88c3113943b016afc5c9ce00900e52a4fda10bd638821ce68/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f44756d702532304c696e7465722e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d746f6d62656e65766964657325324664756d702d6c696e746572267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d437573746f6d2b5048502d43532d46697865722b72756c652b746f2b72656d6f76652b64756d702b73746174656d656e7473266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d737061726b6c6573)](https://github.com/tombenevides)

 [![Total Downloads](https://github.com/tombenevides/dump-linter/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/tombenevides/dump-linter/actions) [![Issues Open](https://camo.githubusercontent.com/d69aedb1a3618ae101d9fc99229571a1ba471eadbfb290fee4c15bb8db3dd342/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f746f6d62656e6576696465732f64756d702d6c696e746572)](https://github.com/tombenevides/dump-linter/issues) [![Total Downloads](https://camo.githubusercontent.com/32bebf6b8bb440d71dbecb07483e36556f451963782c9ddffefe322fa2fb1fba/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f6d62656e6576696465732f64756d702d6c696e746572)](https://packagist.org/packages/tombenevides/dump-linter) [![Latest Version](https://camo.githubusercontent.com/23937cea05c7a78a826856f426a362e9865cc88394821eff97d4012f596bc6ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f6d62656e6576696465732f64756d702d6c696e746572)](https://packagist.org/packages/tombenevides/dump-linter) [![License](https://camo.githubusercontent.com/173c0efff8ae570c6abdd1dbfbbe1e90a6cbc5ec38946b5a9a6c9db8b8f33cef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f746f6d62656e6576696465732f64756d702d6c696e746572)](https://packagist.org/packages/tombenevides/dump-linter)

---

Sometimes you are debugging and end up deploying with your code a `dump`or a `var_dump` (if you're a Laravel dev, the infamous `dd`) and that could be annoying, so **Dump Linter** is a package that complements [PHP-CS-Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer), providing a rule to remove dump statements from the source code.

> ❗ IMPORTANT: the rule is considered risky by PHP-CS-Fixer metrics because technically `dump`/`var_dump` are not errors or bad writing, so be careful and use this rule if you're completely sure that you don't want them in the codebase.

REQUIREMENTS
------------

[](#requirements)

> **[PHP 8.1+](https://www.php.net/releases/)**
>
> **[PHP-CS-Fixer 3](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer)**

HOW TO INSTALL
--------------

[](#how-to-install)

To install the package, just use [composer](https://getcomposer.org):

```
composer require tombenevides/dump-linter
```

HOW TO USE
----------

[](#how-to-use)

### Configuring PHP-CS-Fixer

[](#configuring-php-cs-fixer)

After installing, you need to edit the `.php-cs-fixer.dist.php` file (or the file that you're chose), adding the custom rule using `registerCustomFixers()` function and then set the rule, as you can see below:

```
$config = new PhpCsFixer\Config();

return $config
    ->registerCustomFixers([
        new \Tombenevides\DumpLinter\DumpRemovalFixer()
    ])
    ->setRules([
        '@PSR12' => true,
        'Tombenevides/dump_removal' => true,
        ...
    ])
```

> List of dump statements that will be removed: `dump()`,`var_dump()`,`dd()`,`ray()` and `dumps()`.

More info or questions about PHP-CS-Fixer configuration file, just check [this link](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/config.rst).

### Running the linter with custom rule

[](#running-the-linter-with-custom-rule)

Since this is a risky rule, the default command `php-cs-fixer fix -v` will not work. Therefore, to allow the rule to make the expected changes, you need to give the linter permission to perform risky actions. You do this by adding the `--allow-risky=yes` flag.

LICENSE
-------

[](#license)

**Dump Linter** is a software under the [MIT License](LICENSE)

UPDATES
-------

[](#updates)

👋 Follow the author [@devatreides](https://twitter.com/devatreides) on Twitter to know more about the last updates and other projects. Say Hi!

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~34 days

Total

3

Last Release

1154d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f975c19c0ff9d224e8946919894dd22aa3a0635614c9555ff91bd31da741bb65?d=identicon)[tombenevides](/maintainers/tombenevides)

---

Top Contributors

[![devatreides](https://avatars.githubusercontent.com/u/18440704?v=4)](https://github.com/devatreides "devatreides (15 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/tombenevides-dump-linter/health.svg)

```
[![Health](https://phpackages.com/badges/tombenevides-dump-linter/health.svg)](https://phpackages.com/packages/tombenevides-dump-linter)
```

###  Alternatives

[symfony/stopwatch

Provides a way to profile code

2.8k387.2M918](/packages/symfony-stopwatch)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k29](/packages/fruitcake-laravel-debugbar)[spatie/ignition

A beautiful error page for PHP applications.

510147.6M69](/packages/spatie-ignition)[koriym/printo

An object graph visualizer.

1421.8M2](/packages/koriym-printo)[soloterm/dumps

A Laravel command to intercept dumps from your Laravel application.

125285.7k3](/packages/soloterm-dumps)[beyondcode/helo-laravel

HELO Laravel debug helper

90360.1k](/packages/beyondcode-helo-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
