I'm having some difficulty with PhpStorm picking up my namespaces and use statements in a Symfony 2.8 project. In the past it's been OK, mainly when working locally, but this time I'm working on a development server rather than my local machine.
In this example, my User
entity is extending the FOSUserBundle
class and I am including this and Doctrine like so:
namespace AppBundle\Entity;
use FOS\UserBundle\Model\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
Although the top most use statement has a green mark underneath (Undefined Namespace) and, subsequently, it states that the User
class is undefined too. The FOSUserBundle
was installed via command line, in the usual way with composer require.
This causes me some problems as normally it would be easy to jump to the abstract class and / or included classes within PhpStorm but it's like it's no longer recognising them.
I've tried to Invalidate Cache / Restart as someone else suggested on here but the problem remains.
If anyone has any ideas as to why this may be happening, I would be grateful to hear them.