Search code examples
phpsymfonyphpstorm

Phpstorm-Symfony2 Errors after format code


I installed Phpstorm yesterday to try it with my symfony2 projet. I tried thé "format code" option.... But now i have lors of Errors like

 ReflectionException in AddConsoleCommandPass.php line 40:

Class

SensioLabs\Security\Command\SecurityCheckerCommand

does not exist

How can i fix it please? Thank you !


Solution

  • You must use the reformat on your code, no the Symfony vendors files. Try it for example in a controller or in an entity file. To configure PHPStorm to use the Symfony2 coding standards check out this tutorial. More infos here to use PHPStorm with Symfony2.