Symfony Plugin
for PhpStorm

Compatible with:  IntelliJ IDEA PhpStorm
15.02.2017
1 923 872
Symfony Plugin Documentation | Doc on GitHub | Donate
Install
  • Activate plugin per project in "File -> Settings -> Languages & Framework -> PHP -> Symfony" or use auto configuration notification
  • (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 Annotations
  • (Optional) Install PHP Toolbox
  • (Optional) To support XLIFF translations add "*.xlf" / "*.xliff" to XML "Editor" -> "File Types"
Features: Version

This plugin supports Symfony 2 and 3

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
Related Plugins Contributors

Download plugin

Recent change notes

0.13.x: PhpStorm 2016.3.1+
0.12.x: PhpStorm 2016.1 (no support)
0.11.x: PhpStorm 8, 9, 10 (no support)
0.10.x: PhpStorm 7 (no support)
0.9.x: PhpStorm 6 (no support)

0.13.136
  • Support SensioFrameworkExtraBundle @Route annotation for indexer #828
  • Add else and elseif to Twig references tag whitelist; fix autocompletion on constant twig macro #869
  • Implement support for PSR-11 containers #867
  • Add inspection for xml and yaml constants in dic container
  • Replace deprecated api usages
0.13.135
  • Add global template navigation for xml strings and provide template name completion for "template" attributes #803
  • Linemarker collectors are not instance safe, load lazy values internally #846
  • Support class constant in QueryBuilder::from(Entity::class) #824
  • Make yaml service id visitor case insensitive for class names #847
  • Fix "Missing Parameter" warning for parameters set via environment variables #852
  • Add twig test navigation #860
  • Fix Twig missing asset if variable in declaration #854
  • Use getBlockPrefix instead of override deprecated getName #812 @Koc
  • Optimize Twig clickable function pattern #850
  • Add brace insert handler for Twig functions with string parameter detection #864
  • Add support for class constant in Doctrine repositoryClass on annotation metadata #857
  • Dropping weak route name annotator for php files
  • Fix possible npe in variable type extraction #822
0.13.134
  • Fix ConfigLineMarkerProvider.getTreeSignatures must not return null #846
  • Support yaml "tags" shortcut syntax for service container #849
  • Support optional class for named services #847
  • Support new yaml factory syntax #841
  • Fix Doctrine autocomplete not working for getRepository(Entity::class) #824
  • Save last user selected service generator output format and reuse this value on dialog init #829
0.12.133 / 0.13.133
  • PhpStorm 2016.3.1: Make compatible with new Deployment API @Leneshka-jb #826
  • Code cleanup and Java8 language migrations
0.12.132
  • Support more OptionsResolver options method parameter for references #821
  • Add decorates linemarker for yaml and xml container files
  • Service ids should be autocompleted for decorates #834
  • Add PhpStorm 2016.3 / 2016.3.1 travis environment
0.12.131
  • Disable Twig icon provider; performance issue? #809
  • Support new IF_TAG, SET_TAG tokens for Twig function pattern and fix Twig class constant usages
  • Twig class constant string need to be slash escaped
  • Add references for 'argument type="constant"' inside container services
  • Drop some old PhpStorm / Intellij api workarounds
  • Drop all Yaml scalar value workarounds for service and parameter pattern
  • Fix no autocomplete for SVG assets #753
  • Add form placeholder options to translatable value
  • Provide route name completion in routes using the RedirectController #386, also support template names for TemplateController
  • Add {% endtrans %} and {% endtranschoice %} to autocomplete in Twig templates #599
  • Add XLIFF navigation and translation generation if "*.xlf" / "*.xliff" extension is defined as XmlFile #479, #712
  • Add PHP validator translation references for constraint message, ExecutionContextInterface and ConstraintViolationBuilderInterface
0.12.130
  • Add indexer for template usages in annotations #773
  • Add scope for template index to reduce variable extraction and improve performance #800
  • Template usages now also support function scope
0.12.129
  • Fix navigation for bundle files on linux based system, increase path limit for child path iteration #803
0.12.128
  • Decouple Twig namespace loading and provide more default namespace which work without a compiled container #784 #654
  • Add recursive and directory limit for per Twig path visitor #800
  • Add icon provider for Twig template files for extends and implementations
  • Dropping PhpStorm8 type class constant api workaround
0.12.127
  • Profiler should support http urls as data source #798
  • Profiler in now configurable in plugins settings #798
  • Fix app_dev.php urls in profiler #540, #522
  • Add xml completion, navigation and linemarker for Doctrine 2.5 "Embeddables" #471
0.12.126
  • Fix empty PSI elements should not be passed to createDescriptor in container case sensitivity inspection #788
  • Support public property for form field mapping and dropping custom Doctrine field mapping its part of PropertyAccess component #786
  • Fix "Cannot resolve symbol" for factory service regression and drop deprecated getVariant references for factory method completion #791
  • Add linemarker provider for decorated services with lazy definition navigation
  • Replace timer for caret listener with executor and future pattern #785
  • Add linemarker for config tree builder root definition in [security,config]*.yml files and provide navigation for key itself #793
  • Fix subscriber method creation type hint class was not imported and fix possible memory leak because of PsiElement references

open full changelog

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
Anonymous
06.03.2015
Tu plugin find this kind of route : {% include 'AcmeBundle:Blog:create.html.twig' with { 'form': form } %} But not this one (which is in app/Resources/views) : {% extends "::base.html.twig" %} Except that, love the plugin
Anonymous
06.11.2014
Superb. Second place in plugin top 10 downloads!!! Keep it up!
Anonymous
06.10.2014
A+ Plugin Keep upgrading it!
26.09.2014
This is a wonderfull plugin, cant imagine working with Symfony without this plugin. It would be really nice to see auto complete in YML file and click to jump options as well/
Anonymous
13.08.2014
This plugin is so awesome! Thank you for this great tool :)
Anonymous
16.07.2014
great plugin !!! but missing option to jump into controller by clicking route inside yml routing file if you'll add it, it would be perfect :)
01.06.2014
Excellent plugin! And it keeps getting better and better!
Anonymous
09.03.2014
this is the best plugin for symfony2 ever seen
Anonymous
19.12.2013
Thanks a lot!!!
Anonymous
29.10.2013
This is absolutely awesome. Changed my life!
Anonymous
27.09.2013
How to remove the service icon?
Anonymous
17.09.2013
Can you provide example to run this plugin in php storm for php controller to view?
05.08.2013
A really useful addon for Symfony2 developers. Saves a lot of time.
01.07.2013
Oh) Thanks! Prior to that, i activate only checkbox "Enable Framefork Integration", but this plugin be disabled. Sorry..
01.07.2013
simply enable it in the project settings?
Please  sign in  to leave a comment.