PhpStorm 2018.3 EAP 183.2635.12

The new PhpStorm 2018.3 EAP build (183.2635.12) is now available! You can download it here or via JetBrains Toolbox App. Or, if you have the previous PhpStorm 2018.3 EAP build (183.2635.12) installed, you should soon get a notification in the IDE about a patch update.

Download PhpStorm 2018.3 EAP

This build delivers multiline todos, support for Intersection Types, flexible Heredoc and Nowdoc syntax, PHPDoc PSR-5 <generic> collection type hints, a bunch of bug fixes and improvements for PHP and Web, and includes the latest enhancements of IntelliJ Platform.

Multiline Todos

As you may know, you can create reminders in code comments, and then view them at a later point in the Todo tool window. The comment must start with Todo, Fixme, @TODO, or any other custom pattern that you add under Preferences | Editor | Todo.

PhpStorm now supports multiline todo comments in PHP files, as well as JavaScript, TypeScript, SQL, CSS, and HTML.

Start the todo comment with the usual Todo and then add extra indents on the next lines to continue the todo. If you remove the indentation, PhpStorm will treat it as a normal comment.


Flexible Heredoc and Nowdoc Syntax Support

Developers were not using Heredoc and Nowdoc strings much because of ugly syntax. Luckily, in PHP 7.3, Heredoc and Nowdoc will be significantly improved. You may indent the closing marker as you wish, and the indentation of the closing marker will dictate the amount of whitespace to strip from each line within the heredoc/nowdoc. PhpStorm now supports this upcoming neat syntax:


Support for Intersection Types &

PHPDoc has the concept of Union Types Foo|Bar for many years, and so does PhpStorm. The less known concept is Intersection Types, written as Foo&Bar. It means that the type of a variable is Foo and Bar at the same time. Read more about Union Types vs. Intersection Types in a great write up by Ondřej Mirtes.

In this build, PhpStorm adds support for Intersection syntax on the parser level. Both & and | will behave the same way for now. Stay tuned for more!


Generate setUp and tearDown methods for PHPUnit

PhpStorm has a wide range of context-aware code generation options, which you can access by pressing Cmd+N in the editor.


If you are implementing a PHPUnit test case, you’ll see several additional options. In this build, we’ve added the generation of setUp and tearDown methods. These methods are called every time before and after running each test method, respectively.


PHPDoc PSR-5 <generic> collection type hints

The PSR-5 PHPDoc standard is in the draft state for some time, and is having an Entrance Vote in the PHP-FIG right now. Meanwhile, in PhpStorm we are already adding Generics-style notation support for collections on parser level. See the Collections section in the standard for more examples.

Let us know what you think about it.


Other PHP updates worth noting

  • Fixed extract field refactoring (WI-41683 +9)
  • Fixed order of variables in autosuggestion (WI-30362 +5)
  • Fixed completion inside breakpoint condition while debugger session is not active (WI-6792 +8)

Other platform updates worth noting

  • Added Cmd+1,2,3,4 for selecting tabs like in Chrome, Safari, Firefox (IDEA-68324 +43)
  • Now showing current branch on Commit Dialog (IDEA-63893 +86)
  • Auto-reconnecting to db after “db timeout / disconnect / ssh timeout” (DBE-5294 +66)
  • Fixed spell checker false positive in SQL files at symbol (@) (DBE-2250 +5)
  • Added “Reassociate” action to change a file type association (IDEA-186794 +7)

See the full list of bug-fixes and improvements in the complete release notes.

Future plans

Use the board to view the up-to-date list of the features planned for 2018.3 release, as well as discovered bugs. The list only reflects our current plan and is not final. It may be revised during development since new issues may appear and existing may be re-planned to appear in later versions. Please share your opinions on what is important to you and what would you like to see in the new version!

Download PhpStorm 2018.3 EAP build 183.2635.12 for your platform or click “Update” in your JetBrains Toolbox App and please do report any bugs and feature request to our Issue Tracker.

Your JetBrains PhpStorm Team
The Drive to Develop

This entry was posted in Early Access Program and tagged . Bookmark the permalink.
  • Tomasz Sawicki

    As PhpStorm representative seems to work on PSR-5 (PHPDoc) and PSR-19 (PHPDoc Tags) standards, please make the [type] portion of @param and @return PHPDoc tag optional. It’s becoming less and less needed and is just redundant in most cases.

    • Roverwolf

      Agreed, and it would be nice if PhpStorm didn’t complain about missing @param or @return tags at all if there are type hints for those values.

      • Harrison A. Heck

        If I recall there is a setting on the inspection to change this behavior (re: missing @param @return)

        • Roverwolf

          Thanks. I must have missed those along the way.

  • Paul McGarry

    Is it just me or do the descriptions of the Union/Intersection types on the linked page seem inverted?

    • Jan Tvrdík

      The description is correct, even though it may seem initially counter-intuitive. Intersection types reduce the set of possible values a variable may contain. And the smaller that set is, the more operations can be **safely** done on values inside this set. The extreme case of this, is that when the set of possible values is empty (this happens for example when a function always throws exception), then all operations are valid. For example, you can safely call any method on return type of exit function.

      • Paul McGarry

        Well yes, but the linked page says:

        Union Types
        – When a function accepts Foo|Bar as an argument, it means that only properties and methods that are available on both Foo and Bar can be safely accessed on the variable. If Foo has a $loremProperty, you can access it only if Bar has the same property.”

        which to me sounds like a “smaller set” and is a better description for an “Intersection Type” not a “Union Type” which should be the larger set (all things on either Foo or Bar).

  • Felipe Martins

    PSR-5 <3

  • Stefan Brauner

    generic collection type hints are really great; but they aren’t really helpful. I use DoctrineCommonCollectionsCollection for the type hints. When creating getter/setter, only Collection is used for their Comment. And if used the generic collection type hint for @param $anything and want to use $anything in a foreach loop, I have always mixed as a type of the variable, not my AppEntitySomething

    For using code completion, it’s easier using DoctrineCommonCollectionsCollection|AppEntitySomething[]. I thought the generic collection already worked a few hours ago, but I’m not sure. Maybe I tested with an old type hint; or something got broken.

  • Markus