Auto insertion of use namespace

Answered

I remember I was able to get PS to automatically insert `use namespace\here` when I use a new class.

Just tried installing guzzlehttp in composer, but PS wasn't able to see the GuzzleHttp namespace.

And I forgot what I did to make it insert the `use` statement.

Anyone?

 

2 comments
Comment actions Permalink

Hi there,

You just complete your class (as in "$a = new your_class();" or alike) and namespace will be auto imported (the "use" statement).

If auto import does not work -- check your settings in "Settings/Preferences | Editor | General | Auto Import --> PHP section"

1
Comment actions Permalink

Great. Thanks!

0

Please sign in to leave a comment.