PhpStorm 2018.1. EAP 181.3870.19

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

This build delivers new features, bug fixes, and improvements for PHP and the Web, and includes the latest improvements in IntelliJ Platform.

Git partial commits

In this EAP, IntelliJ Platform has implemented long-awaited partial Git commits. The IDE can now commit only selected changes from the file and skips all other changes. You can include code chunks into a commit using the checkboxes in the Diff pane of the Commit Changes dialog.

Screen Shot 2018-02-21 at 16.54.17

Additionally, the IDE now provides the ability to associate the code chunks, not the whole file, with a changelist, and track them separately. Code chunks can be quickly moved between changelists using the Move to another changelist action which is available from the context menu of the Diff pane in the Commit Changes dialog.

move_changelist

Alternatively, you can add code chunks to a changelist right from the editor – click on a change marker in the gutter. In the pop-up which appears you can choose from the available changelists or create a new one.

Other features worth noting

  • New inspection: ‘foreach’ can be replaced with ‘array_fill’ WI-39780 
  • Inline function: allow to inline function to multiple calls WI-40605 
  • Inplace introducing: support ‘extract constant’ WI-39247 
  • Inplace introducing: support ‘extract field’ WI-39246
  • Old GUI REST client is deprecated
  • HTTP Client: Support private environment variable file WI-40380 
  • Built-in SSH: does not support strong security ciphers – Cannot negotiate, proposals do not match IDEA-140196 
  • Add not listed CSS &JS files for suggesting for go to declaration in HTML files WEB-17009 
  • Provide option to complete styles from all CSS files even if current file has a style tag WEB-7317 

Apart from new features, this build brings many important bug fixes and usability improvements, including these:

  • Fixed: CSS selector completion in HTML document does not work if there is an inline style block WEB-2223 

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

Future plans

Use the board here to view the up-to-date list of the features planned for 2018.1 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.1 EAP 181.3870.19 for your platform from the project EAP page 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

Posted in Early Access Program | 3 Comments

PhpStorm 2018.1. EAP 181.3741.23

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

This build delivers new features, bug fixes, and improvements for PHP and the Web, and includes the latest improvements in IntelliJ Platform.

Inline function/method refactoring

Sometimes a method’s body is more obvious than the method itself. The good solution for the situation is to replace the calls to the method with the actual method’s content. Since this may be tricky in some cases, we’ve implemented the Inline refactoring to help you with it.

Just put the caret on the function or static method call and invoke Refactor|Inline. If the refactoring is possible, PhpStorm will perform all the necessary transformations: create all intermediate variables, change self to the class name, and even handle multiple return points.

inline_refactoring

For now, PhpStorm will not allow you to inline non-static methods. As a workaround, you can use two refactorings, Make method static and Inline, in sequence. In the future, we plan to support the inlining of non-static methods, too.

Indication of the PHP Language Level sync status with composer.json

In the previous release, we’ve introduced settings synchronization with composer.json as an easy way to keep your PhpStorm settings in sync with your project. Unfortunately, this has also brought some confusion: when you change the PHP Language Level in the settings, it may still get reset after restarting PhpStorm due to the require section in composer.json.

To avoid this, we’ve redesigned the settings page to give you a better clue of what is going on.

language_level

New quick fixes: Replace foreach with array_filter and back

The quick fix that allows replacing foreach with array_map and vice-versa was warmly welcomed, so we’ve decided to continue development in this area. This time, we introduce the foreach to array_filter and the reverse – array_filter to foreach quick fixes.

array_filter

Other features worth noting

  • Updater should automatically download patch in background IDEA-46819 
  • Add support for markdown in jsdoc WEB-11052 

Apart from new features, this build brings many important bug fixes and usability improvements, including these:

  • Fixed: Support different names for tsconfig.json WEB-28091 

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

Future plans

Use the board here to view the up-to-date list of the features planned for 2018.1 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.1 EAP 181.3741.23 for your platform from the project EAP page 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

Posted in Early Access Program, Newsletter | 5 Comments

PhpStorm 2018.1. EAP 181.3494.16

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

This build delivers new features, bug fixes, and improvements for PHP and the Web, and includes the latest improvements in IntelliJ Platform.

REST Client: assertions support

We continue development of the new REST client, and in this EAP we’ve added support for assertions. The client object has received two new methods: test and assert. You can create a new test by using the following syntax:

Inside a test body, you can call client.assert(assertion, “Failure message”), where assertion is any expression evaluating to a Boolean. You can use any JavaScript (ECMAScript 5.1) code inside your test, for example, string.search method, if statements, and so on. Having written your test, execute a request and see the results of the tests in Tests tab.

rest_tests

We encourage you to try the new feature and share your thoughts on what is missing and which assertion would you like to see in future!

Codeception: code coverage support

This build brings code coverage for Codeception, that many of you have asked us to implement. It works exactly like PHPUnit coverage: simply press the Run with coverage button near the existing Codeception configuration, or right-click anywhere inside a Codeception class or method and select this item from the context menu. You will see the coverage results in the Project view as well as in the code editor’s left gutter: the covered code lines will be indicated with the green markers, while the uncovered lines – with red markers.

codeception_coverage

We’re reusing the Codeception configuration so you will need to have coverage configured on the Codeception side. You can read more about how to do that in the Codeception documentation.

Other features worth noting:

  • URL links in comments are not clickable in the editor WI-28548 
  • Suggest @internal and @deprecated last when autocompleting WI-37750 

Apart from new features, this build brings many important bug fixes and usability improvements, including these:

  • Fixed: Class aliases should be ignored if the class declaration with the same FQN exists WI-40295 
  • Fixed: search everywhere doesn’t get focus IDEA-124160 

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

Download PhpStorm 2018.1 EAP 181.3494.16 for your platform from the project EAP page 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

Posted in Early Access Program | 4 Comments

PHP Annotated Monthly – February 2018

PHP Annotated Monthly LogoIt’s February already! As the year rolls along relentlessly, here are all the links to all the blog posts you need to read curated by Gary Hockin, Developer Advocate for PhpStorm.

Continue reading

Posted in PHP Annotated Monthly | Tagged , , | 5 Comments

Getting PhpStorm ready for Xdebug 2.6

When it comes to PHP debugging, Xdebug is the de-facto standard. With the 2.6 version released last week, it’s a good time to take a look at the new features. And since Xdebug has always been tightly integrated with PhpStorm, we’ve been preparing ourselves for it, too.

Continue reading

Posted in Cool Feature, Newsletter | Tagged , | Leave a comment

How PhpStorm helps bitExpert developers be more productive – Case Study

In this post, we are happy to present to you an interview with Stephan Hochdörfer, Head of Technology at bitExpert. Stephan shares his insights on PhpStorm and tells us how PhpStorm helps bitExpert developers be more productive and experience the power of a “toolset that just works.”
bitExpert

Continue reading

Posted in Newsletter, Sales and Promotions | Leave a comment

PhpStorm 2018.1. EAP 181.3263.18

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

This build delivers new features, bug fixes, and improvements for PHP and the Web, and includes the latest improvements in IntelliJ Platform.

Configurable unchecked exceptions

In the last release, we’ve implemented new inspections that help you to find uncaught exceptions as well as to find redundant @throws tags. It was possible to ignore \Runtime and \Logic exception and all their children, but we were asked to make a configurable list of unchecked exceptions.

In this build, we added the list that can be found at Preferences | Languages & Frameworks | PHP | Analysis tab. To cover most cases, we extended the list with \Error and \PHPUnit\Exception. PhpStorm takes into account not just listed exception but all children classes as well. You can add your specific exception that shouldn’t be caught but we encourage you to keep the list as short as possible to avoid missing a real exception.

unchecked_exceptions

REST Client: support for response handler scripts

We continue improving REST client and in this build, we’ve added a way to run custom JavaScript code (ECMAScript 5.1 specification) to generate and manipulate variables that can be used later in HTTP requests.

We provide two additional objects:

  • client stores meta information about the session, it can be modified inside a script and it will preserve its state till IDE will be closed. All variables saved in client.global can be used in subsequent HTTP requests as {{variable_name}}
  • response holds information about the response, i.e. content-type, status, response body.

Objects completion and documentation are already enabled in in-place scripts. To enable completion in a separate javascript file open a context menu in a target file, select Use JavaScript Library and select HTTP Response Handler.

rest_js

PHPUnit: Gutter icons for running tests

There is a fantastic PHPUnit Enhancement plugin that provides additional PHPUnit specific completion, navigation, and support of Prophecy. It also adds gutter icons to run the tests. Unfortunately, the current implementation has its limitations.

We’ve decided to implement gutter icons for PHPUnit tests right in the PhpStorm core. PHPUnit gutter icons support different type of running tests (Run, Debug, Run with Coverage), works with Local as well as Remote Interpreters and shows the previous execution state (passed, failed, not started).

Please vote for issue in case you see double icons.

phpunit_gutter

Other features worth noting:

  • Spellchecker gives very small amount of suggestions WI-705 
  • Support PHPUnit @coversDefaultClass annotation WI-30157
  • REST Clien: Show documentation for header fields WEB-30841 
  • Actions to navigate to prev/next occurrence of identifier under caret IDEA-59638 
  • Use yarn instead of npm if yarn is installed WEB-27974 

Apart from new features, this build brings many important bug fixes and usability improvements, including these:

  • Can’t typehint a class with the name “Resource/Bool/Integer/Object” WI-15619 
  • Wrong PHPDoc parameter type generated for variadics WI-29429 
  • Wrong PHPDoc formatting with Brackets WI-31025 

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

Download PhpStorm 2018.1 EAP 181.3263.18 for your platform from the project EAP page 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

Posted in Early Access Program | 11 Comments

PhpStorm 2017.3.4 is released

PhpStorm 2017.3.4 build 173.4548.32 is now available! You can download it here, in JetBrains Toolbox App or if you have installed the previous PhpStorm 2017.3.3, you should soon get a notification in the IDE about a patch update.

This build delivers bug fixes and improvements for IntelliJ Platform.

Notable bug fixes and features worth mentioning:

  • Fixed: Allow UI scale exceed 2x IDEA-171404 
  • Fixed: Multiple “Updating indices” bg tasks after external file system changes IDEA-123287 
  • Fixed: Evaluate window: cannot TAB from expression into results tree IDEA-158873

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

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

JetBrains PhpStorm Team
The Drive to Develop

Posted in Newsletter, Release Announcements | Tagged | 22 Comments

Refactor your code to functional style with PhpStorm 2018.1

How many times you wrote code like this to achieve a simple purpose?

Mapping values of an array:

Filtering:

Or reducing an array to some value:

The above code samples involve the imperative programming style, which is familiar to everybody. It has a certain flaw: we have to parse the code in our head and go through negligible but required details to understand it.

To solve this issue, PHP suggests relying on the built-in functions: array_map, array_filter, array_reduce, etc. These functions can improve readability and emphasize the intent of your code. Unfortunately, it’s not always clear when and how to apply them to the existing code, since in some cases details can be crucial.

To help you with the task, we are going to introduce automatic ways of transforming imperative code to functional equivalents via the corresponding inspections and quick fixes. Since there can be a lot of tricky cases and possible transformations, we’ve decided to start with the simplest case of the foreach to array_map transformation inspection and quick fix.

In PhpStorm 2018.1 EAP, you can find the new Loop can be converted to ‘array_map’ call inspection under Settings | Editor | Inspections | PHP | Code Style and apply the corresponding quick fix as usual, by pressing Alt + Enter.

array_map_3

Should you reconsider, the ‘array_map’ call can be converted to loop inspection and quick fix, which do exactly the opposite, are provided, too.

We’re going to add more transformations and cover more cases in the future.

What do you think about functional programming in PHP? What types of transformation do you find the most useful? Give us your opinions in the comments or tweet @phpstorm!

Your JetBrains PhpStorm Team
The Drive to Develop

Posted in Cool Feature | Tagged , | 6 Comments

PhpStorm 2018.1 Early Access Program is Open

Today we start the Early Access Program for PhpStorm 2018.1 (EAP). A fresh build 181.3007.10 is available for download here and within the JetBrains Toolbox App.

What is Early Access Program?

Early Access Program (EAP) allows you to try pre-release versions of our software to evaluate features that will be added in the next release. It is important to distinguish EAP from traditional pre-release software. Please note that the quality of EAP versions may at times be far below even usual beta standards. If you are looking for a stable version of PhpStorm, please visit our site.

webide_logo

This build delivers new features, bug fixes and improvements for PHP and the Web, and includes the latest improvements in IntelliJ Platform.

Continue reading

Posted in Early Access Program, Newsletter | 26 Comments