Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jrdavidson's avatar

PHP CS FIxer

I'm trying to get php cs fixer plugin set kup properly for Visual Studio Code. I came across the a .php_cs.laravel.php file that is used for Laravel Shift for fixing common problems with their Laravel projects.

Should I place the .php_cs.laravel.php inside of my project files or place it inside of the .vscode directory as a global file. The reason why I ask is because I want to be able to use the same file for all of my Laravel specific projects.

https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200

0 likes
3 replies
michapietsch's avatar
Level 10

@xtremer360 If you include it in the single project repo, all contributors can use a consistent style.

At the end, I think, it does not matter that much, if all projects follow the same style, but that each project has a consistent style for itself.

jrdavidson's avatar

Thanks for your reply. I have it working so that when I use the extension to format the document it works according to the rules I’ve set, however I have the Format on Save option checked in the extension settings and it’s not going by the same rules

jrdavidson's avatar

Actually I found out that it was another extentsion that somehow got set to auto sort imports on save.

Please or to participate in this conversation.