Compatible with: IntelliJ IDEA PhpStorm
Nov 14, 2017
2 405 003
Symfony Plugin Documentation | Doc on GitHub | Donate
Install
  • Activate plugin per project in "File -> Settings -> Languages & Framework -> PHP -> Symfony" or use auto configuration notification
  • (Required) Install PHP Annotations
  • (Optional) Configure a default project connection in "Remote Hosts Access / Remote Hosts" to enable support for remote files in plugin settings
  • (Optional) Ignore Symfony "cache" directory because of duplicate classes "Settings -> Project -> Directories"
  • (Optional) Install PHP Toolbox
  • (Optional) To support XLIFF translations add "*.xlf" / "*.xliff" to XML "Editor" -> "File Types"
Features: Version

This plugin supports Symfony 2, 3, 4, ...

Dependency Injection Container
  • References for services in ContainerInterface::get()
  • Detect ContainerInterface::get() result type
  • References for services, tags, events, methods, ... inside yaml, xml and php
  • Indexer to provide live editing without a compiled container
  • Tagged class indexer
Doctrine
  • ORM QueryBuilder support, including chaining and nested methods
  • References and TypeProvider for doctrine getRepository
  • TypeProvider for EntityRepository::find/findOneBy/findAll/findBy
  • Field and relations resolving and annotation and yaml
Templates/Twig
  • Template names in all file references
  • Provide Template implements and extends goto on linemarker
  • Assets file references like javascript, stylesheets and more
  • Support @Template annotations
  • Trans and transchoice support with annotator, quickquick and translation extraction action
  • References for block names (completion back since PhpStorm8)
  • Variable TypeProvider similar to php with several scopes and providers like docblocks, controller, actions, template inclusion, ...
  • Macro implements goto on linemarker
  • Filter, Function, Macro and Extension support
Forms
  • References for form types
  • Form field name references on data_class
  • References for form options, extension, ...
Routing
  • References for UrlGenerator::generate() related calls
  • Autocomplete route name in twig templates
  • Go to for routing name methods
  • CodeFolding to display real route uri instead of its name
  • Route parameter completion
Other
  • Annotator which notice unknown route, template, service, assets, ...
  • Several stub indexer to provide some live generation provider in replacement for compiled container
  • Linemarker and "Related File" to provide possible goto targets and controller action
  • Search Everywhere support and custom search for only Symfony related Symbols "Navigate > Symfony Symbol"
  • Bridge for PHP Annotations to support annotation related stuff
  • Dotenv and Docker environments variable extraction for DIC parameter
Related Plugins Contributors

Download plugin

Recent change notes

  • Provide completion for named key parameter in xml files #1052
  • Reimplement Twig template name resolving to improve performance for large projects
  • Improve performance for instance check and drop very beginning Symfony2InterfacesUtil class
  • Allow multiple targets for routing name resolving
  • Add directory navigation for Twig templates #1076
  • Merge twig and yaml goto / navigation handler into one extension

see full changelog | Donate

General usage instructions

Note that the plugin uses the app/cache/dev/appDevDebugProjectContainer.xml file to know services' class, so this file has to exists and/or be up to date :-) Also note that you need the latest PHPStorm EAP build, download at http://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program