Reformatting/Code Style doesn't do anything

I am just starting with PhpStorm and duplicated the default PHP code style to my custom scheme yesterday. All went well and looked good.

But today it stopped working completely for the PHP styles. Neither the preview changes, nor my code when I press CMD + OPTION + L. It says everything is properly formatted. 

When I change something in the settings it doesn't reflect to what I change. It doesn't work in the default scheme as well. However HTML works and when I change something the preview pane blinks and reflect my edits.

Here is what I exported from the code styles settings:


I tried to import your XML file and, at least, a preview is working.

Could you please also share an example of non-formatted code that you are trying to reformat, so I could check it on my installation with your settings applied?


Sure, here is the small demo code I am using:

Here you can see nothing changes, when I click the checkboxes. The first day I tried PhpStorm I saw changes take effect immediately. It still works on other languages, but not PHP.


It says, nothing has to be reformatted. But I would assume spaces will convert to tabs, indention will be corrected, the { will move to their proper position etc.


Please disable all custom plugins at Preferences | Plugins | Installed | Downloaded, restart PhpStorm and check if the issue persists. If it does, probably it makes sense to try starting with an empty PhpStorm config - rename the ~/Library/Preferences/PhpStorm2018.3 folder, start PhpStorm not importing settings, open the problematic project and check again.

I really expect the issue to be gone, as it's not reproducible on two support engineers' machines.


I only had "String Manipulation" installed, but disabling didn't helped. But I noticed when I create a new project and open the Settings it works again. So it must be related to the project itself?!


Must be. If it's acceptable for you, you can purge the .idea folder so that the project settings were reset.

Or, you can first try removing just codeStyleSettings.xml.


It seems to be working now, after I delete the .idea folder. Hope this is not a common problem in PhpStrom 


Please sign in to leave a comment.