PHP Storm forcing use statments in a single line Follow
Hi,
I am writing PHP with PHP Storm. Every time I save the file all the use statements will go to a single line. I would like them to stay in different lines. How to fix?
So this:
use a;
use b;
use c;
Turns to this:
use a;use b;use c;
Please sign in to leave a comment.
In fact, PhpStorm should not do that by default (and there is no setting to configure), so it must be a misbehavior. If my memory does not lie to me, there was a similar bug report a while ago, however I was not able to quickly find it.
What exact IDE version do you have installed, is it a 2021.3.3 already?
I had version 2021.2 and updated now to version 2021.4.
Problem still remains.
EDIT: Problem solved. Problem was with Save Actions -plugin.
The issue was in Settings -> Save Actions -> Optimize imports.
I had it checked. Unchecked fixes my issue.
Thanks for reply though :)
Thanks for the update, good to hear that the issue is resolved!
However, I am still wondering why "Optimize imports" reformats imports in this way in your scenario. If you are also curious, you may share your code style settings (exported as XML), so I could try these on my setup :)