6

I try to set Symfony2 plugin so I can use annotations. I installed the plugin, PHPStorm restarted and the cache was invalidated.

And now, some code:

/**
 * @ORM\Id
 * @ORM\Column(type="integer")
 * @ORM\GeneratedValue(strategy="AUTO")
 */
private $id;

When I put @ORM\ and I hit Ctrl+Space I see No suggesions.

This doesn’t work? I set something wrong?

3
  • have you imported Mapping by use Doctrine\ORM\Mapping as ORM; ? Commented Apr 29, 2014 at 15:07
  • yes, I have imported. Commented Apr 29, 2014 at 16:52
  • already works fine, PHPStorm 8.x and plugins Symfony2 Plugin and PHP Annotations. Commented Oct 14, 2014 at 12:06

5 Answers 5

3

You are on the wrong plugin :)
PHP Annotations

phpstorm php annotation

Sign up to request clarification or add additional context in comments.

Comments

3

For future visitors, just click File->Invalidate caches/Restart... and everything will work. https://github.com/Haehnchen/idea-php-annotation-plugin#install

Comments

0

PHPStorm doesn't support doctrine annotation for the moment.

http://youtrack.jetbrains.com/issue/WI-6187

But maybe there's more informations about this somewhere else.

Comments

0

In order to have a full code completion for annotations of Symfony framework and others, you should install first the Symfony Plugin then PHP annotations, this article shows what you should install in PHPStorm to code faster Symfony Applications

Comments

0

I was having the same issue, whenever i installed php annotation plugin from github it was not working.

Issue was resolved once i installed plugin from latest .jar file from history section of plugin home page.

https://plugins.jetbrains.com/plugin/7320

enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.