Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony4 Expected String but got String

I have this error everywhere in my Controller where I "render" or I access a variable through a getParameter:

expected "\Symfony\Bundle\FrameworkBundle\Controller\string" got string

What's wrong?

like image 529
Antoine Nedelec Avatar asked May 04 '18 17:05

Antoine Nedelec


1 Answers

It is not an error of your code, it's a error on your IDE, I assume that you are using PHPStorm, go to File > Invalidate Caches/ Restart .. that should solve it.

like image 113
Gmo Quinteros Avatar answered Nov 15 '22 00:11

Gmo Quinteros