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?
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.
In the Settings/Preferences dialog ( Ctrl+Alt+S ), navigate to PHP | Symfony and select the Enable Plugin for this Project checkbox.
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.
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.
You are on the wrong plugin :)
PHP Annotations
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With