Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Annotations in PHPStorm by Symfony2 plugin

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?

like image 896
mkjasinski Avatar asked Apr 29 '14 14:04

mkjasinski


People also ask

What are PHP annotations?

PHP annotations are basically metadata which can be included in the source code and also in between classes, functions, properties and methods. They are to be started with the prefix @ wherever they are declared and they indicate something specific.

How to Install Symfony plugin in PHPStorm?

In the Settings/Preferences dialog ( Ctrl+Alt+S ), navigate to PHP | Symfony and select the Enable Plugin for this Project checkbox.

Is PHPStorm part of IntelliJ?

 IntelliJ IDEA Ultimate is a superset of most IntelliJ platform-based IDEs. If the bundled language plugins are enabled, it includes support for all technologies that are available within our more specific IDEs, such as PyCharm, WebStorm, PHPStorm, and so on.

What is annotate in IntelliJ?

Annotations Last modified: 17 March 2022. Java annotations are pieces of metadata that provide information about the code they are used with, and can instruct the IDE how to process this code.


1 Answers

You are on the wrong plugin :)
PHP Annotations

phpstorm php annotation

like image 112
Daniel Espendiller Avatar answered Nov 15 '22 08:11

Daniel Espendiller