PHPStorm Undefined Namespace - How to make my IDE know what i want to use?

Hey guys! 

I just wonder is there is any posibility to make my ide know about namespaces that i working with. I am not sure is it even possible but maybe one of you know what to do to get things work properly. Right know i have some plugin that i use with doctrine, and there is also package that my IDE don’t know about it. 

Btw. I have phpStorm Symfony and Shopware plugin on. 

My PHPStorm is 2019.1 version. , I am using Shopware 5.

Here is a code:

And anywhere where i use SchemaTool object reference.

Thanks for any suggestions.

Did you tried to invalidate cache and restart?

@Shyim schrieb:

Did you tried to invalidate cache and restart?

Yes I tried this, but still is not working. 

Hey @komoito‍,

this is the Shopware 6 area, is that right? Are you trying this in Shopware 6?

Because there is no such class in Shopware 6, that’s why he fails to find that namespace. It’s actually not existing. Same for the class Shopware\Components\Plugin.
That seems to be Shopware 5 code.

Kind regards,
Patrick  Shopware

@Patrick Stahl schrieb:

Hey @komoito‍,

this is the Shopware 6 area, is that right? Are you trying this in Shopware 6?

Because there is no such class in Shopware 6, that’s why he fails to find that namespace. It’s actually not existing. Same for the class Shopware\Components\Plugin.
That seems to be Shopware 5 code.

Kind regards,
Patrick  Shopware

Hi, yep that is shopware 5  Angry-Face I forgot to mention about that. 

 

[@Patrick Stahl](http://forum.shopware.com/profile/1869/Patrick Stahl “Patrick Stahl”)‍ do you suggest if I used shopware 6 all dependencies and others stuff should work properly? 

 

Hey @komoito‍,

no, I was just wondering, because initially your thread was in the Shopware 6 section, yet you were talking about Shopware 5.

Does the referenced class Doctrine\ORM\Tools\SchemaTool exist in your project?
Usually, there shouldn’t be any issues with that namespace in Shopware 5. Must be an IDE related issue then.

Kind regards,
Patrick  Shopware

1 Like