Symfony Plugin

Compatible with:  IntelliJ IDEA PhpStorm
13.11.2016
1 829 748
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.12.x: PhpStorm 2016.1
0.11.x: PhpStorm 8, 9, 10 (no support)
0.10.x: PhpStorm 7 (no support)
0.9.x: PhpStorm 6 (no support)

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
0.12.125
  • Dont index translations files without domain prefix
  • Add twig path configuration parser of yaml files #654
  • Support xml factory method and class tag #778
  • Api migration for upcoming PhpStorm 2016.3 eap #782
  • Smarter default namespace detection for default Domain of translations extraction dialog for injected html #776
  • Add support for "twig.paths" as "add path" Twig namespaces #654
0.12.124
  • Fix form "csrf_protection" was not found because of Symfony 3.0 interface drop
  • Add static "FormType" fallback and visit method "setDefaultOptions", "configureOptions" for extension key
  • Support translation_domain and default keys for form OptionsResolver implementation
  • Rename "Symfony Installer" to "Symfony" in new project dialog
  • Use IntelliJ DialogWrapper for dialog boxes of file templates
  • Add service id completion for xml attribute value on class attribute
  • Add completion for service id arguments without type attribute but valid service parent
0.12.123
  • Autocomplete service ids for ContainerBuilder::removeDefinition, removeAlias #761
  • Add service resolving for tool box provider and provide tests
  • Add doctrine dbal querybuilder "delete" references
  • Strip "\Bundle\" only namespaces in default service naming strategy
  • Fix route reference not showing in controller that is in a sub namespace on slashes #763
  • Add references for Twig blocks in embed tag #361, #513
  • Fix npe in xml parameter attribute values #766
  • Dialog of template creation dialog, translation key extractor, service generator should be relative to editor component
  • Made ServiceArgumentSelectionDialog closable on ESC #751 @kstenschke
  • Support trans_default_domain in embed #660
  • Let `trans_default_domain` autocomplete put quotes around domain #526
  • Fix Document block for EventSubscriber method creation in PhpStorm >= 2016.1 #745
0.12.122
  • Service generator should close on escape key event
  • Fix nullable condition on service container builder #754
  • Fix yaml does not autocomplete route host option #756
  • Settings for the plugin may be better placed inside the PHP group, like other frameworks #735
  • EAP: Fix nullable value index for container parameter #737
  • Fix possible memory leaks in settings because of project reference
  • Add navigation for yaml constant "!php/const:" syntax
  • Internally: Dropped all container service source, just one collection now
0.12.121
  • Add support for decorator inner services #510
  • Fix NPE exception in RouteHelper #750
  • Fix NullPointerException in FormFieldResolver #747
  • Add navigation for controller annotation #748
  • Service parent key completion should only be valid inside service scope #744
0.12.120
  • Don't report standalone yaml colon in mapping value @xabbuh #733
  • "request" service should only be visible inside supported Symfony version < 3.0
  • Inspection for deprecations should only be available with their corresponding Symfony versions #734
  • Drop IntelliJ platform api usage of CompletionProgressIndicator: "it's pretty private API, and current usages make it very hard to change things" #732
  • Add "shared" yaml completion for replacement of "scope" in Symfony 3.0
  • Yaml class autocompletion should only complete inside services for OroCRM plugin #728
  • Add Intellij 2016.1.2 and eap channel environment for travis testing
  • Fix equals / hashCode violation for eap channel and next PhpStorm release on all indexes and globally force a reindex #737
  • Migrate all indexes to object serializable objects
  • Add support for new autowiringTypes container property #699
  • Extend container tag name completion with index of findTaggedServiceIds #740; fix private tags are not autocompleted #216
  • Fix private services completed in PHP scope

0.12.119
  • Add extension points to allow service collecting for external plugins
  • Add extension point to locate service declaration in file
  • Move default services from static file to collector
0.12.118
  • Fixing npe in service generator intention #722
  • Implement lock for timer clear on caret listener #722
  • Add index to provide autocompletion for DIC parameters defined dynamically #478
  • Convert service name to lowercase in index and xml navigation should navigation to service name case insensitive
  • Add service container class name variants if definition not unique in project
  • Add @Event annotation indexer; provide completion, navigation, method type hint #493
  • Fix exception Accessing indexes from PhpTypeProvider2 while building indexes violates contract #670
  • Fix missing Yaml deprecation detection for colon in unquoted values #719
  • Add method type hint class importer for subscriber events #564
  • Dropping weak route name inspection, no need for this anymore
  • Refactoring route to use object serialization, add route method index and force reindexing #725
  • Add inspection for form types as name deprecation; includes a quickfix
0.12.117
  • Use popover for container tag suggestion
  • Add class name completion for service generator dialog
  • Service generator can now directly insert yaml services
  • Some yaml ascii char dont need to be escaped, fix inspection for them and reduce deprecated warning to weak notification #693
  • Migrate yaml argument creation and update callback to new lexer
  • Add service completion suggestion / highlights for service arguments

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.