Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run code formatter from the command line with PhpStorm open

If I go to my PhpStorm\bin folder I can run the format.bat command to format files from the command line e.g.

phpstorm format -r C:\path\to\my\code -r -s c:\path\to\my\settings.xml

and that works great. However I cannot run the command if PhpStorm is open, I get an error:

Only one instance of PhpStorm can be run at a time

Not ideal to have to close my IDE or have to use a 3rd party code formatter. Is there any workaround? Without installing another copy of PhpStorm.

like image 389
CodeMonkey Avatar asked Jan 31 '26 18:01

CodeMonkey


1 Answers

It's a known issue, please see: https://youtrack.jetbrains.com/issue/IDEA-160462

like image 124
y.bedrov Avatar answered Feb 03 '26 08:02

y.bedrov