1

I use Laravel and PhpStorm and recently PhpStorm begun throw warning messages. It can not see some classes. "Undefined class"

But, the all test green, and of course the namespaces are correct. I had already run composer autoload dump.

Someone has met such problem?

LazyOne
  • 158,824
  • 45
  • 388
  • 391
LaszloP
  • 171
  • 2
  • 4
  • 16
  • It's good if you share some code, is there your Route and other Facades work correctly? – Meher Ullah Khan Raj Feb 07 '22 at 09:13
  • Does this answer your question? [Undefined class Route (Laravel in PhpStorm)](https://stackoverflow.com/questions/37419143/undefined-class-route-laravel-in-phpstorm) – Meher Ullah Khan Raj Feb 07 '22 at 09:15
  • 3
    In such "suddenly stopped working" cases I can suggest to use **"File | Invalidate Caches..." and restart the IDE** letting it to reindex the whole project. If you are using latest 2021.3.x then you can also try the steps at the **"File | Repair IDE..."** . P.S. It's also possible that some plugin messes things up. In such a case try disabling all custom (not bundled by default) plugins and restart the IDE. If this helps -- enable 1-2 plugins at a time. – LazyOne Feb 07 '22 at 11:34
  • I have this issue with the PhpStorm 2020.3. Although the undefined class will be defined when you change its code. but this is annoying solution while you have several undefined classes whenever open the PhpStorm. Any solution? – Hamid Jun 02 '22 at 15:23
  • I have a call to a method in a nonexistent class "$this->_something->blah();" and the IDE is unable to highlight it. Tried everything recommended here, but no joy. What am I missing? – luenib Jan 03 '23 at 22:47

0 Answers0