There is no such functionality present in current version of PhpStorm.
There is a ticket for similar functionality ( http://youtrack.jetbrains.com/issue/WI-1362 ) but that is for "namespace" and "use" statements only (nothing to do with include/require).
You may submit new Feature Request for your case (that's in case there is no such ticket already -- possibly I've missed it) on Issue Tracker: http://youtrack.jetbrains.com/issues/WI
P.S. I think using autoloading functionality of PHP instead will be more beneficial and easier than waiting for such ticket to be implemented (which I do not expect to see implemented very soon). No need to add new/remove unused include/require statements -- just register you loader that will search for them in appropriate places; with properly chosen class names etc it will be almost as fast as manual include/require approach.
I'd love some thoughts from the JetBrains folks on this.....
Hi Dave,
What do you mean by "auto import"?
Generally speaking, there is no "import file" action available in PhpStorm. You either
P.S.
Not JB folk .. but I hope you do not mind.
For example:
If in my code I have the following line:
$accountVO = new AccountVO();
I'd like there to be a way to automatically have the following line automatically added to my code.
include_once 'model/AccountVO.php';
Thanks for the reply!
Dave
Hi Dave,
There is no such functionality present in current version of PhpStorm.
There is a ticket for similar functionality ( http://youtrack.jetbrains.com/issue/WI-1362 ) but that is for "namespace" and "use" statements only (nothing to do with include/require).
You may submit new Feature Request for your case (that's in case there is no such ticket already -- possibly I've missed it) on Issue Tracker: http://youtrack.jetbrains.com/issues/WI
P.S.
I think using autoloading functionality of PHP instead will be more beneficial and easier than waiting for such ticket to be implemented (which I do not expect to see implemented very soon). No need to add new/remove unused include/require statements -- just register you loader that will search for them in appropriate places; with properly chosen class names etc it will be almost as fast as manual include/require approach.
Hi Andriy,
Thanks. Looks interesting. Curious about performance impacts.