Early Access Program Features Releases

PhpStorm 2019.1 EAP #6

PhpStorm 2019.1 EAP build 191.5849.26 is now available!

This build delivers support for debugging Laravel 5.8 Blade templates, improvements and fixes for PHP, and all the fresh updates from the WebStorm team and IntelliJ Platform!

You can download it on the website or via JetBrains Toolbox App. Or, if you have the previous PhpStorm 2019.1 EAP build installed, you will soon get a notification in the IDE about a patch update.

Laravel Blade Templates Debugging

Laravel 5.8 has just been released! Among other features, it delivers a small template modification. Combined with PhpStorm 2019.1 this small change gives an awesome new feature: now you’ll be able to do step debugging inside of original Blade files!

The problem is that Blade templates are not the files that your application runs. First, they are compiled and saved to a cache directory. Then the application runs those compiled files. So before PhpStorm 2019.1, if you set a breakpoint in an original Blade template, it would never stop there. Putting a breakpoint in the compiled file was tough. Fortunately, this is not a problem anymore.

To start debugging Laravel Blade templates:

  1. Set up your PHP debugger. Check out the Ultimate Guide on Debugging or this quickstart video on debugging with Docker.
  2. Configure PhpStorm for Blade debugging by specifying a path to the compiled templates under Settings/Preferences | Languages & Frameworks | PHP | Debug | Templates
    laravel-blade-debug-config

Having done all that, you can set a breakpoint in the original Blade template files with a .blade.php extension, just like you would with PHP files. Now you’re ready to begin step debugging!

laravel-blade-debug-2

Unused Declaration Inspection

PHP is a quite mature platform with 25 years of history. No wonder that we as PHP developers can very often face legacy code. The first thing you might want to do with a legacy codebase is clean it up a bit. Finding and removing dead code can be hard, so PhpStorm comes to the rescue with a new inspection. It will carefully analyze your code and data flow, and highlight the entities that were probably never used. For example, it will find usages including dynamic ones accessed via magic methods.

You’ll get unused classes, class members, or functions grayed out right in the editor window:

dead-code

If you want to get a list of all unused declarations, run Code -> Inspect Code…
This will run all inspections by default, so if you want to specifically see the Unused report, then choose only those you wish:

unused-declaration

unused-declaration-report

Let us know how you like this new inspection! Do you have to work with legacy apps often? What else would you like to see in PhpStorm to help you modernizing apps?

Initial Support for PHP 7.4 Typed Properties

PHP 7.4 release is planned for this November, and the first Alpha builds are expected in the summer. This is when we plan to add full support for upcoming PHP features.

Meanwhile, if you want to start preparing your applications or packages for PHP 7.4 using typed properties, PhpStorm will correctly highlight the syntax for you.

typed-properties

Customizable Number of Spaces in PHPDoc

PhpStorm is able to automatically generate PHPDoc comments based on your code. You may configure how you want the comments to look, by going to Preferences | Editor | Code Style | PHP and opening the PHPDoc tab.

We keep improving flexibility for configuring PHPDoc. In EAP build #3, we’ve added the ability to define the order of tags and the possibility to control a number of spaces for @param block:

phpdocs-spaces

Switch sides of compared files in diff viewer

Now, the Diff of the ‘Compare with clipboard’, and ‘Open Blank Diff’ actions can swap sides. It is now possible to select which file is presented on the right and which on the left, by clicking the Swap Sides button. The new Swap Sides option is also available if you’re comparing folders.

swap-slides

See all the PHP-related bug-fixes and improvements in our issue tracker, or the full list of changes in the release notes.


What are Early Access Programs?

  • 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.
  • Your feedback is very welcome in our issue tracker: youtrack.jetbrains.com/issues/WI. Please don’t forget to mention the build number you’re using.

Please report any problems to our issue tracker, or add comments to this post. Your feedback is much appreciated. Oh, and the most active EAPers will get prizes from us!


Download PhpStorm 2019.1 EAP build 191.5849.26 for your platform from the project EAP page, or click “Update” in your JetBrains Toolbox App.

Your JetBrains PhpStorm Team
The Drive to Develop

image description