Download the PHP package tombenevides/dump-linter without Composer

On this page you can find all versions of the php package tombenevides/dump-linter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dump-linter

Total Downloads Issues Open Total Downloads Latest Version License


Sometimes you are debugging and end up deploying with your code a dumpor 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, 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

PHP 8.1+

PHP-CS-Fixer 3

HOW TO INSTALL

To install the package, just use composer:

HOW TO USE

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:

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.

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

Dump Linter is a software under the MIT License

UPDATES

👋 Follow the author @devatreides on Twitter to know more about the last updates and other projects. Say Hi!


All versions of dump-linter with dependencies

PHP Build Version
Package Version
Requires friendsofphp/php-cs-fixer Version ^3.13
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tombenevides/dump-linter contains the following files

Loading the files please wait ....