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

**URL:** <https://forum.shopware.com/t/phpstorm-undefined-namespace-how-to-make-my-ide-know-what-i-want-to-use/59945>\
**Category:** Programmierung\
**Created:** [11. Juni 2019 um 06:14 UTC](https://forum.shopware.com/t/phpstorm-undefined-namespace-how-to-make-my-ide-know-what-i-want-to-use/59945 "2019-06-11T06:14:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![komoito](https://avatars.discourse-cdn.com/v4/letter/k/48db29/32.png) [@komoito](https://forum.shopware.com/u/komoito)\
**Post date:** [11. Juni 2019 um 06:14 UTC](https://forum.shopware.com/t/phpstorm-undefined-namespace-how-to-make-my-ide-know-what-i-want-to-use/59945/1 "2019-06-11T06:14:00Z")

</div>

Hey guys!&nbsp;

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.&nbsp;

Btw. I have phpStorm&nbsp;Symfony and Shopware plugin on.&nbsp;

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

Here is a code:

![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/4/4d997577926aef1ad9c3aef7d19a9ab9d767cf0c.png)

And anywhere where i use SchemaTool object reference.

![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/e/ea23f3413ea5b0a14073fb590bf89e660be316aa.png)

Thanks for any suggestions.

---

<div class="post-metadata">

**Author:** ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)\
**Post date:** [11. Juni 2019 um 06:22 UTC](https://forum.shopware.com/t/phpstorm-undefined-namespace-how-to-make-my-ide-know-what-i-want-to-use/59945/2 "2019-06-11T06:22:17Z")

</div>

Did you tried to invalidate cache and restart?

---

<div class="post-metadata">

**Author:** ![komoito](https://avatars.discourse-cdn.com/v4/letter/k/48db29/32.png) [@komoito](https://forum.shopware.com/u/komoito)\
**Post date:** [11. Juni 2019 um 06:30 UTC](https://forum.shopware.com/t/phpstorm-undefined-namespace-how-to-make-my-ide-know-what-i-want-to-use/59945/3 "2019-06-11T06:30:59Z")

</div>

> [@Shyim schrieb:](https://forum.shopware.com/profile/20792/Shyim "Shyim")
> 
> Did you tried to invalidate cache and restart?

Yes I tried this, but still is not working.&nbsp;

---

<div class="post-metadata">

**Author:** ![Patrick\_Stahl](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/patrick_stahl/32/7679_2.png) [@Patrick\_Stahl](https://forum.shopware.com/u/Patrick_Stahl)\
**Post date:** [11. Juni 2019 um 06:55 UTC](https://forum.shopware.com/t/phpstorm-undefined-namespace-how-to-make-my-ide-know-what-i-want-to-use/59945/4 "2019-06-11T06:55:41Z")

</div>

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&nbsp;_Shopware\Components\Plugin_.  
That seems to be Shopware 5 code.

Kind regards,  
Patrick&nbsp; ![Shopware](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "Shopware")

---

<div class="post-metadata">

**Author:** ![komoito](https://avatars.discourse-cdn.com/v4/letter/k/48db29/32.png) [@komoito](https://forum.shopware.com/u/komoito)\
**Post date:** [11. Juni 2019 um 07:02 UTC](https://forum.shopware.com/t/phpstorm-undefined-namespace-how-to-make-my-ide-know-what-i-want-to-use/59945/5 "2019-06-11T07:02:13Z")

</div>

> [@Patrick Stahl schrieb:](https://forum.shopware.com/profile/1869/Patrick%20Stahl "Patrick%20Stahl")
> 
> 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&nbsp;_Shopware\Components\Plugin_.  
> That seems to be Shopware 5 code.
> 
> Kind regards,  
> Patrick&nbsp; ![Shopware](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "Shopware")

Hi, yep that is shopware 5&nbsp; ![Angry-Face](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/4d894c4dd47121f4ab1fba0317660ce0f6dbd4be.png "Angry-Face")&nbsp;I forgot to mention about that.&nbsp;

---

<div class="post-metadata">

**Author:** ![komoito](https://avatars.discourse-cdn.com/v4/letter/k/48db29/32.png) [@komoito](https://forum.shopware.com/u/komoito)\
**Post date:** [11. Juni 2019 um 07:48 UTC](https://forum.shopware.com/t/phpstorm-undefined-namespace-how-to-make-my-ide-know-what-i-want-to-use/59945/6 "2019-06-11T07:48:27Z")

</div>

&nbsp;

[@Patrick Stahl]([http://forum.shopware.com/profile/1869/Patrick](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?&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![Patrick\_Stahl](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/patrick_stahl/32/7679_2.png) [@Patrick\_Stahl](https://forum.shopware.com/u/Patrick_Stahl)\
**Post date:** [11. Juni 2019 um 07:54 UTC](https://forum.shopware.com/t/phpstorm-undefined-namespace-how-to-make-my-ide-know-what-i-want-to-use/59945/7 "2019-06-11T07:54:35Z")

</div>

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&nbsp; ![Shopware](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "Shopware")
