Skip to content
Branch: master
Find file History
lllopo and czosel Fix #993 (#994)
Add ':' to path characters being replaced. Fixes #993
Latest commit 4089673 Mar 16, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
.php_cs.dist docs: php-cs-fixer integration (#942) Feb 1, 2019
PrettierPHPFixer.php Fix #993 (#994) Mar 16, 2019
README.md docs: fix typo in php-cs-fixer recipe (#944) Feb 1, 2019

README.md

Prettier integration to php-cs-fixer

This recipe uses prettier/plugin-php as a Fixer for php-cs-fixer.

prettier will be executed at the very beginning before the other fixers are applied, such that the php-cs-fixer user's configurations is respected.

Useful Configurations

Priority

If you would like prettier to execute last, which means you prefer to use php-cs-fixer to complement the current missing features of prettier, you can decrease the priority value of this fixer by decreasing the value returned by getPriority function to something like -999

Configure Prettier's setting

If you would like to add configuration settings for prettier to this Fixer, you can modify the exec line in applyFix function.

For example,

  - exec("yarn exec -- prettier --write $tmpFile");
  + exec("yarn exec -- prettier --write --brace-style=1tbs $tmpFile");

will allow you to change the braceStyle for this fixer

Possible Improvement

  • the configuration can be modified from php-cs-fixer configuration
  • autoloading
You can’t perform that action at this time.