Improve Your Efficiency in OroCRM Coding

Improve OroCRM development

If you develop OroCRM applications, you know that you develop Symfony applications. And you can improve your efficiency by using a good integrated development environment (IDE) and some additional tools. We use PhpStorm in development, which is a JetBrains product (maybe the best of the IDEs), and we also use a great tool – Symfony Plugin.

Symfony Plugin is a free tool. It should be installed once but must be enabled and configured for each Symfony project.

How to install:

Go to Preferences > Plugins and click button Browse repositories…

symfony_plagin_1_install

Search for “Symfony” and click Install plugin button and confirm plugin installation to continue.

symfony_plagin_2_install

In order to enable and configure the plugin you should click the Project Settings hyperlink, or alternatively go through Project Settings in Symfony2 Plugin and select the check-box Enable Plugin for this Project. Clicking OK will save our changes to the settings. After that restart the PhpStorm.

symfony_plagin_3_enable

Now we have an ability to use the additional features. See the list below.

Dependency Injection Container

  • References for services in ContainerInterface::get() and detect ContainerInterface::get() result type

    symfony_plagin_4_coding

  • References for services, tags, events, methods, … inside yaml, xml and php

    symfony_plagin_5_coding

  • An indexer to provide live editing without a compiled container and tagged class indexer

Doctrine

  • ORM QueryBuilder support, including chaining and nested methods
    symfony_plagin_6_coding
  • References and TypeProvider for doctrine getRepository
    symfony_plagin_7_coding

Templates/Twig

  • Template names in all file references
    symfony_plagin_8_coding
  • Provide Template implements and extends goto on linemarker
  • Assets file references like javascript, stylesheets and more
  • Supports @Template annotations
  • Trans and transchoice support with annotator, quickquick and translation extraction action
    symfony_plagin_9_coding
  • 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
    symfony_plagin_10_coding
  • References for form options, extensions, …
    symfony_plagin_11_coding

Routing

  • Autocomplete route name in twig templates
    symfony_plagin_12_coding
  • Go to for routing name methods
  • CodeFolding to display real route url instead of its name
    symfony_plagin_13_coding

Symfony Plugin is really great tool for improving your efficiency. It speeds up development and decreases the number of mistakes. We haven’t described the full list of Symfony Plugin additional abilities. There are really a lot of them – some we do not use, and some we hardly ever use. In this post we tried to describe the most often used abilities by us. The only downside this plugin has – it needs a lot of computer resources. So keep your computer updated and improve your coding productivity.

You may also want to read:

Clients

Smart Brands Choose Us.

From Mark Cuban and Sir Richard Branson backed startups, to Inc 500 US Fastest Growing Companies and Global Brands choose us to deliver and support unparalleled eСommerce experience for their customers.