Every release cycle, we invest a lot of effort in fixing bugs and improving the performance of all our IDEs at JetBrains. This time, we’re going even further. We’ve organized a quality marathon, during which all of our teams that work on the IntelliJ Platform or benefit from it will focus almost exclusively on performance and quality.
The PhpStorm team is in the marathon as well, which means you’ll see many long-standing issues and pain points finally resolved, especially those that affect most users. You may expect fewer new features added to PhpStorm this time, but we promise to make you happy with full PHP 7.4 support, PSR-12 code style, some new functionality, and great enhancements.
In the current build, you’ll find support for many PHP 7.4 features, the ability to specify the interpreter for PHP test run configurations, and the ability to inject PHP in literals. The update incorporates all the latest improvements from the IntelliJ Platform as well.
If you’re not yet familiar with our Early Access Programs, here are the basics you should know:
- Every week we publish a fresh build for the upcoming version of PhpStorm.
- EAP builds provide access to the newest features we’re currently developing.
- EAP builds are free to use but expire within 30 days of the build date.
- Important! PhpStorm EAP builds are not fully tested and might be unstable.
- You can install an EAP build side by side with a stable PhpStorm version to try the latest features.
PHP 7.4 Support
The PHP team has already announced the availability of the first release candidate of PHP 7.4. More than two months remain before the final release, but you may find the full list of changes in PHP 7.4 in the UPGRADING document or in this great What’s new in PHP 7.4 post.
In PhpStorm 2019.2, we added comprehensive support for Typed Properties. Now in this 2019.3 release cycle, we bring you the rest of the goodies.
Numeric Literal Separator
In PHP 7.4, it will be possible to place underscore separators anywhere in a number to visually format it. This is quite useful when you deal with long numbers, and it improves the readability of the code.
Covariant Returns and Contravariant Parameters
PHP 7.4 fixes multiple inconsistencies, and one of them relates to the type system. When you work with a method inherited from a parent class, it will now be possible to define a more specific return type, and less specific parameter types for it.
Nested ternary operator
Almost all programming languages compute the ternary operator from right to left. PHP did it differently, which was counterintuitive and could lead to mistakes. Now, PHP 7.4 deprecates left associativity. This means you either should not be using nested ternaries at all, or if you have to, then you should use parentheses to explicitly declare the order of computation.
PhpStorm 2019.3 will highlight deprecated expressions, and provide you with a quick-fix to clarify the behavior:
PHP 7.4 deprecations
The good thing about PHP releases is that they not only add new features, but also deprecate old ones, making the language cleaner and more pleasant to work with. The upcoming release comes with a whole bunch of deprecations.
PhpStorm 2019.3 will add corresponding inspections and highlight code pieces that need your attention. Where possible, you’ll have an option quick-fix the deprecated behavior automatically.
Specify the interpreter for PHP test run configurations
PhpStorm has a convenient way to run PHPUnit (or other test frameworks) tests inside the IDE, view the results and code coverage state, and use many other features. The problem was that it could only run with your default PHP interpreter. With the rising popularity of virtualization/containerization, this was inconvenient at best.
Now in PhpStorm 2019.3, this will be fixed! You can choose any interpreters that you have to run your tests with. Feel free to use Docker, Vagrant, or any other remote interpreter too.
Want to run tests with PHP 7.4? Just add an interpreter from Docker image
php:rc-cli and you’re done.
Inject PHP language
Sometimes you need to use PHP inside a string literal. We hope it’s not in
eval(), but you get the point. Or maybe you want to get PHP highlighting in code blocks in Markdown files.
In PhpStorm 2019.3, you’ll be able to get all of these, thanks to a special PHP dialect called InjectablePHP. This dialect works similar to PHP, but the opening tag can be omitted.
It will be automatically injected in markdown fences with the info string equal to
Heredoc/nowdoc strings with
Well, and into
eval() calls too:
You can also inject it manually, where needed.
Smooth mouse scrolling
As mentioned above, the upcoming v2019.3 is also going to address various usability issues. For example, we hope you’ll like the brand new smoother scrolling.
We’ve tried a few different options and we think that the one in this EAP build works rather smoothly. If you think it should be tweaked some more, do give us your feedback in the corresponding ticket.
The full list of changes, including both bug-fixes and improvements, is available in the release notes.
Please report any problems you find to our issue tracker, or by commenting on this post. Your feedback is much appreciated!
Your JetBrains PhpStorm Team
The Drive to Develop