I like ZendStudio feature when after typing class name and pressing “Enter” it automatically adds namespace use statement into the head of the script file.
Is it possible to do the same in the PhpStorm IDE?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not sure if this has been there all the time, or if it a new addition but it can be done already.
On my case, you get on top of the class that you want the
useimported and you pressalt+Enter. A popup allowing you to select which namespace you want to import pops up.You can see a more graphical explanation here:
PHP Storm Tricks: Add your USE Statements Automatically!