Download the PHP package coffreo/php-cs-fixer-config without Composer
On this page you can find all versions of the php package coffreo/php-cs-fixer-config. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download coffreo/php-cs-fixer-config
More information about coffreo/php-cs-fixer-config
Files in coffreo/php-cs-fixer-config
Package php-cs-fixer-config
Short Description Provides a configuration factory and multiple Coffreo rule sets for friendsofphp/php-cs-fixer.
License MIT
Informations about the package php-cs-fixer-config
php-cs-fixer-config
All credits goes to localheinz/php-cs-fixer-config
.
This project is a fork with Coffreo rules and few changes to:
- add header template feature
- add reading of composer.json datas to fullfill header template
- handle multiples version of
php-cs-fixer
in tests
This repository provides a configuration factory and multiple Coffreo rule sets for friendsofphp/php-cs-fixer
.
Installation
Run
Usage
Configuration
Pick one of the rule sets:
Coffreo\PhpCsFixer\Config\RuleSet\Php54
(includes migration 5.6 rules)Coffreo\PhpCsFixer\Config\RuleSet\Php54To56
(includes ONLY migration 5.6 rules)Coffreo\PhpCsFixer\Config\RuleSet\Php56
Coffreo\PhpCsFixer\Config\RuleSet\Php70
Coffreo\PhpCsFixer\Config\RuleSet\Php71
Coffreo\PhpCsFixer\Config\RuleSet\Php72
:ledger: All configuration (except Php54To56
) include @Symfony
and @PSR2
rules.
Create a configuration file .php_cs
in the root of your project:
Git
Add .php_cs.cache
(this is the cache file created by php-cs-fixer
) to .gitignore
:
Makefile (optional)
Create a Makefile
with a cs
target:
:bulb: This can either be done with other scripting launcher (npm run ..
or composer run-script ..
)
Developer commands
Few commands to know when updating this project:
FAQ
- I've installed everything but it keeps me warning that few rules are inexistents.
You get thie error message because the version of
friendsofphp/php-cs-fixer
is not appropriate with selected rules set. Two potentials causes:
- Ensure your ruleset is compatible with your PHP version (56 for 5.6, 70 for 7.0, etc...)
- Check your composer.json for
config.platform
key. It should either be undefined or the correct value depending on your PHP version. The presence of this config key force composer to install cs-fixer version related to PHP version defined by this key, ignoring real current version of PHP.)