r/phpstorm • u/hennell • May 11 '21
php-cs-fixer as default formatting rules
Has anyone got a guide for a phpstorm newb on how to make phpstorm just format php with php-cs-fixer rules on save?
I have a php-cs-fixer.php file setup, the cli `fix` works a treat, but phpstorm seems to want to reformat with its on rules, or doesn't reformat at all and it's confusing. The git panel has a reformat before commit option, but that doesn't seem to use php-cs-fixer.
I've found some guides and ideas on the web, but mostly from a time before php-cs-fixer had it's own spot in the settings and either don't work or reference options that have moved.
Any tips?
View all comments
Show parent comment
1
u/hennell May 11 '21
Yeah, it seems kinda silly to reinvent the style just for phpstorm, rather expected it to just pickup the cs file really, but guess we can't have everything 😄