Download the PHP package webifycms/dev-tools without Composer
On this page you can find all versions of the php package webifycms/dev-tools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download webifycms/dev-tools
More information about webifycms/dev-tools
Files in webifycms/dev-tools
Package dev-tools
Short Description Set of development tools to analyze and auto fix code standards, formatting and other stuffs for WebifyCMS packages.
License MIT
Informations about the package dev-tools
WebifyCMS Dev Tools
Set of development tools to analyze and auto-fix code standards, formatting and other stuff for WebifyCMS packages.
The following libraries are included:
friendsofphp/php-cs-fixerphpstan/phpstanrector/rectorsymfony/var-dumper
Installation
Install via composer
Configuration
- PHP CS Fixer
You can add the rules and finder instance in the following way to your config file .php-cs-fixer.php:
- PHPStan
Add phpstan.neon in the root directory, and include the default config like below:
- Rector
Add rector.php in the root directory and the following, if you need to add more paths, you can add them as well:
Usage
- Analyze your code first with PHPStan static analyzer for errors and fix (manual fix):
Additionally, add the following to your phpstan.neon file to enable installed PHPStan extensions:
- Run code sniffer and format your codes.
(Recommended) If you wish to fix manually, you can just output the rules that will apply like the following.
If you wish to auto-fix the files and output the summary of changes, you can run the following.
Upgrade code with RectorPHP
Debugging
The symfony/var-dumper package is included and provides the dump() and dd() helper functions for inspecting
variables during development.
e.g. use dump() within your .php-cs-fixer.php or rector.php config files to inspect the resolved configuration:
e.g. use dd() function (dump and die) to halt execution after dumping:
Testing
Run unit tests with PHPUnit:
NOTE: You can also set up this extension with your favorite IDE or editor, so you can get more advantages like format on save while developing.
TODO
- [x] Install
phpstan/phpstanlibrary. - [x] Install Rector
rector/rectorlibrary. -
[x] Add alias commands for the library commands, like the following:
- [x] Add support to pass arguments to the alias commands.
All versions of dev-tools with dependencies
friendsofphp/php-cs-fixer Version ^3.0
phpstan/phpstan Version ^2.0
rector/rector Version ^2.0
phpstan/phpstan-strict-rules Version ^2.0
phpstan/phpstan-phpunit Version ^2.0
phpstan/phpstan-deprecation-rules Version ^2.0
symfony/var-dumper Version ^8.1