{"id":17024961,"url":"https://github.com/devatreides/dump-linter","last_synced_at":"2026-05-05T06:32:01.737Z","repository":{"id":65217429,"uuid":"588259731","full_name":"devatreides/dump-linter","owner":"devatreides","description":"A php-cs-fixer custom rule for dump statement removal","archived":false,"fork":false,"pushed_at":"2023-03-22T04:31:10.000Z","size":51,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-02T05:01:04.927Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devatreides.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-01-12T17:49:20.000Z","updated_at":"2023-01-14T10:37:44.000Z","dependencies_parsed_at":"2023-12-23T22:15:36.643Z","dependency_job_id":"6d05a379-f6ce-438a-acfc-dbe313b42bb1","html_url":"https://github.com/devatreides/dump-linter","commit_stats":null,"previous_names":["devatreides/dump-linter"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devatreides%2Fdump-linter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devatreides%2Fdump-linter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devatreides%2Fdump-linter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devatreides%2Fdump-linter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devatreides","download_url":"https://codeload.github.com/devatreides/dump-linter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245006277,"owners_count":20546133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T07:27:36.481Z","updated_at":"2026-05-05T06:32:01.703Z","avatar_url":"https://github.com/devatreides.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://github.com/tombenevides\" target=\"_blank\"\u003e\u003cimg src=\"https://banners.beyondco.de/Dump%20Linter.png?theme=light\u0026packageManager=composer+require\u0026packageName=tombenevides%2Fdump-linter\u0026pattern=architect\u0026style=style_1\u0026description=Custom+PHP-CS-Fixer+rule+to+remove+dump+statements\u0026md=1\u0026showWatermark=0\u0026fontSize=100px\u0026images=sparkles\" width=\"650\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/tombenevides/dump-linter/actions\"\u003e\u003cimg alt=\"Total Downloads\" src=\"https://github.com/tombenevides/dump-linter/actions/workflows/tests.yml/badge.svg?branch=main\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/tombenevides/dump-linter/issues\"\u003e\u003cimg alt=\"Issues Open\" src=\"https://img.shields.io/github/issues/tombenevides/dump-linter\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://packagist.org/packages/tombenevides/dump-linter\"\u003e\u003cimg alt=\"Total Downloads\" src=\"https://img.shields.io/packagist/dt/tombenevides/dump-linter\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://packagist.org/packages/tombenevides/dump-linter\"\u003e\u003cimg alt=\"Latest Version\" src=\"https://img.shields.io/packagist/v/tombenevides/dump-linter\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://packagist.org/packages/tombenevides/dump-linter\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/packagist/l/tombenevides/dump-linter\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nSometimes 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.\n\n\u003e ❗ 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.\n\n## REQUIREMENTS\n\n\u003e **[PHP 8.1+](https://www.php.net/releases/)**\n\u003e\n\u003e **[PHP-CS-Fixer 3](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer)**\n\n## HOW TO INSTALL\n\nTo install the package, just use [composer](https://getcomposer.org):\n\n```bash\ncomposer require tombenevides/dump-linter\n```\n\n## HOW TO USE\n\n\n### Configuring PHP-CS-Fixer\n\nAfter 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:\n\n```php\n$config = new PhpCsFixer\\Config();\n\nreturn $config\n    -\u003eregisterCustomFixers([\n        new \\Tombenevides\\DumpLinter\\DumpRemovalFixer()\n    ])\n    -\u003esetRules([\n        '@PSR12' =\u003e true,\n        'Tombenevides/dump_removal' =\u003e true,\n        ...\n    ])\n```\n\n\u003e List of dump statements that will be removed: `dump()`,`var_dump()`,`dd()`,`ray()` and `dumps()`.\n\nMore 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).\n\n### Running the linter with custom rule\n\nSince 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.\n\n## LICENSE\n\n**Dump Linter** is a software under the [MIT License](LICENSE)\n\n## UPDATES\n\n👋 Follow the author [@devatreides](https://twitter.com/devatreides) on Twitter to know more about the last updates and other projects. Say Hi!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevatreides%2Fdump-linter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevatreides%2Fdump-linter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevatreides%2Fdump-linter/lists"}