PhpStorm 2018.3.1 is released
PhpStorm 2018.3.1 build 183.4588.67 is now available!
In the first update for the recently released PhpStorm 2018.3, we are happy to bring you new features including support for custom string format functions and improved handling of @internal annotations. The release also has some bug fixes and improvements for PHP and the Web, and takes on the latest improvements in IntelliJ Platform.
Support for custom string format functions
In PhpStorm 2018.3, we improved the way
printf() functions are handled – their parameters and placeholders under the caret are highlighted. In this update, we are taking another step forward: you can now define your own custom string formatting functions, and PhpStorm will apply appropriate highlighting to them, too.
To add custom formatting functions, go to Settings / Preferences | Languages & Frameworks | PHP | Analysis. There, expand the Custom Format Functions node and add a new item:
You can add both class methods and plain functions, and PhpStorm will provide you with code completion in both cases. Then, specify the index of the argument where your formatting template resides.
That’s it: apply your changes, and your custom formatting function will be included in the analysis:
Improved @internal annotation handling
In this update, we’ve improved the behavior of the Usage of internal entity inspection, which handles
Previously, marking a class as internal would result in all class usages marked as internal, too.
@internal commonly denotes elements internal to a package or a library, the inspection takes your actual project structure into account:
- In a project with no source roots, no
@internalclass usages will be marked.
- If a source root is configured and the
@internalclass is located inside it, the usages inside this source root won’t be marked, but usages outside this source root will be marked.
- If the
@internalclass is located inside a library, all its usages outside libraries will be marked.
- In a Test Sources root, no
@internalelements’ usages will be marked.
To learn more about working with content roots, refer to PhpStorm help.
This update also brings notable bug fixes and features worth mentioning:
- Fixed: Macro multiple $Prompt$ in External Tools (IDEA-129070 +22)
- Fixed: “Close session” and “Select Next/Previous Tab” no longer works in terminal since latest build (IDEA-200854 +18)
- Fixed: In anonymous classes constructor arguments are treated like anonymous class scope instead of outer scope (WI-34498 +15)
- Fixed: Unused private method not detected when recursion (WI-17810 +14)
- Added: Code completion for Vue.js instance methods and properties (WEB-28529 +10)
- Fixed: Opening Embedded Terminal starts with: “cp: overwrite … ” (IDEA-202523 +8)
- Fixed: Start ssh session is broken in 183.3795.24 (IDEA-203045 +8)
- Fixed: Extract Method Refactoring: add parameter’s type if variable’s type is known (WI-15860 +8)
- Fixed: PHP Array Constants – Expression is not allowed as field default value (WI-37537 +5)
See the full list of bug-fixes and improvements in the release notes.
We appreciate you reporting any bugs and feature requests to our Issue Tracker.
Your JetBrains PhpStorm Team
The Drive to Develop
Subscribe to Blog updates
Thanks, we've got you!
PHP Annotated – October 2023
Welcome to the October edition of PHP Annotated! We'll recap the most interesting developments in the PHP community over the past month, featuring handpicked news, articles, tools, and videos. (more…)…
The Pest Plugin Is Now Maintained by JetBrains
You've probably heard about the Pest test framework developed by Nuno Maduro and the community. There is also a dedicated PhpStorm plugin for Pest, which until now has been brilliantly developed by Oliver Nybroe. In this post, we will talk about how JetBrains is going to maintain the plugin, and her…
PHP Annotated – September 2023
Welcome to the September edition of PHP Annotated! We'll recap the most interesting developments in the PHP community over the past month, featuring handpicked news, articles, tools, and videos. (more…)…