Refactor Selected Code as a PHP include or require
HI,
Is there a way within PhpStorm to quickly convert the selected code into an include or require.
i.e it would cut the selected code, create a new file, then replace the selected code with an include or require statement to this new file
Naturally with a dialog box to specify the include name.
Just find myself doing this quite often and would like to do it more efficiently.
请先登录再写评论。
Hello,
Does Refactor > Move not work for this? For instance, you can move out the class and it will be properly referenced.
Vladimir, Refactor > Move does not work as this is about moving a file, not the selection (selected code) within a file.
Not possible currently, here's a feature request: https://youtrack.jetbrains.com/issue/WI-35876
Excellent - just voted for this - seems kind of obvious to me.....