Reasons for developing TYPO3 with PhpStorm

For sure you can do code for TYPO3 with any NotePad++ / Gedit / Textedit if you like. But if you want good code developed in an efficient and fast way, you will need a cool and supportive IDE. A lot of developers in the TYPO3 community rely on PhpStorm [8] for this purpose.

Power of the Storm

That is because of a lot of very cool features that every IDE should have. PhpStorm implemented them and they worked in a very easy way.

  • Full autocompletion and syntax highlighting of PHP as well as HTML, JavaScript and CSS. And of course also the full TYPO3 API is available for autocompletion.
    • That also imply that you can jump easily from the call of a function to its definition or find all usages of this function by just one click on the definition.
    • This feature works also for cross language files. You surly know these kind of files with a colorful mix of PHP, HTML and JavaScript.
  • Full PSR-2 support. All TYPO3 code should be done according with PSR-2 [1] and PhpStorm supports you here by default.
  • Integrated support of the version control system of your choice. GIT, SVN and even CVS.
  • Possibility to work with files on a remote server (with various options to upload changes, automatically or not).
  • Excellent code formatting even when pasting code from other sources.
  • Smart refactoring with renaming of variables and functions (including their usages in both code and comments).
  • Great code inspections to find duplicate code and extract it instantly into own functions.
  • Debugging becomes a piece of a cake. [9] Just set a breakpoint within your code and upon execution it will stop exactly there and you can check within the IDE what are the actual values of your parameters and could dig deeper into single functions. Step by step, line by line. Even for CLI on a remote server over an SSH tunnel.

TYPO3 specific stuff

As PhpStorm is so wide spread within the TYPO3 community, a couple of enthusiastic add new TYPO3 specific features like:

  • TypoScript Plugin for full autocompletion and syntax highlighting of TypoScript. That works for the default TYPO3 set as well as your own custom created TypoScript snippets. You can have it for free [2] or in a paid version [3]
  • Autocompletion and syntax highlighting for Fluid. Either by the XML Schema provided by Helmut Hummel [4] or (since yesterday) with a specialized plugin again from the guys of sgalinski [5].
  • A XLIFF utility plugin to extract hard coded labels from files into an XLIFF file and replace that with the corresponding view helper [6]. Very helpful to refactor legacy code.
  • By using the EditorConfig plugin together with the .editorconfig file provided from the TYPO3 core, you ensure that also your HTML, CSS and JS files will be formatted according to TYPO3 standards.
  • And there are a lot of other very useful plugins to ease your daily developers life. E.g.: .ignore, PHP Annotations, PHP Inspections, PHPUnit autocomplete, Vagrant, Git Flow Integration, Markdown, CodeGlance or DynamicReturnTypePlugin.
    But describing all these benefits in detail would exceed the scope of this post. Maybe that could be a good entry for a new post „Best practices with PhpStorm“.

But it costs money!

Yes, it does in the first time. Currently roundabout 90 EUR for individuals and 200 EUR for companies. Given the assumption, you pay your developers 20 EUR/h, that investment is returned after the 10th saved hour of stupid debugging or searching for a function definition. So buying a worthy IDE is much cheaper than let you waste your developers time by forcing them to use insufficient tools.

And the most important reason should be: Your developers can focus on what they like doing – creating good code. So their motivation will raise and they will have a lot more fun during work.

Yes, I know, that was a shameless celebration of PhpStorm, but I really love working with the IDE and the guys of JetBrains and the providers of the cool plugins really deserve that praise.

Links

  1. PSR-2 code styling guide
  2. TypoScript Plugin from sgalinski at JetBrains Plugin repository (free version)
  3. TypoScript Plugin from sgalinski (paid version)
  4. XML Schema from Helmut Hummel
  5. Fluid Plugin from sgalinski (paid version)
  6. XLIFF Plugin from onigunn
  7. Dynamic Return Value Plugin
  8. PhpStorm
  9. Zero-configuration Web Application Debugging with Xdebug and PhpStorm

Ein Gedanke zu „Reasons for developing TYPO3 with PhpStorm

  1. In addition it’s possible to use PhpStorm for free most of the time if you are willing to live some bugs. The EAP version is free and is for early adopters that are willing to some times have some bugs.
    Mostly they are not that obvious but in 2 years there were some nasty ones. Though i have a payed licence i use the EAP because some features i like to use as fast as possible.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert