PhpStorm 2017.3. EAP 173.3302.10

The new PhpStorm 2017.3 EAP build (173.3302.10) is now available! You can download it here or via JetBrains Toolbox App. Or, if you have the previous PhpStorm 2017.3 EAP build (173.3188.26) 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: Support environment variables

This build brings the support of environment variables for our new REST client. Now you can easily switch between different environments, e.g. production, testing, development.

Environment variables can be defined in rest-client.env.json file, that should be stored inside the project. If a variable is not defined in the environment file, the variable text will be sent instead, (e.g. “{{unresolved-var}}”). An environment variable name should consist of letters, digits, underscore sign ( _ ) or hyphen sign (-). It can be used in request host, port, path, query parameter or value, header value. See related issues for current limitations: WEB-28638

Current environment can be chosen on execution. The previously used environment should appear at the beginning of the execution options and will be used for ‘Structure View’ and ‘Open in browser’ actions.

request_with_env

Let’s look at the specific example. We create rest-client.env.json with the content:

Then we create test.http file:

Now when we run the request using dev environment we get:

From the platform side the update brings:

  • Vue.js is now bundled in PhpStorm
  • Databases: Support Postgres Foreign Data Wrappers (DBE-1865)
  • Databases: Group Data Sources by folder (DBE-77)

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

Download PhpStorm 2017.3 EAP 173.3302 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 | Leave a comment

PhpStorm 2017.3 EAP 173.3188.26

The new PhpStorm 2017.3 EAP build (173.3188.26) is now available! You can download it here or via JetBrains Toolbox App. Or, if you have the previous PhpStorm 2017.3 EAP build (173.2941.8) 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.

Twig Formatting

This build brings improved Twig formatting that can now handle complex structures and provide correct indentations for them.

twig_formatter_2

Injections in Twig templates

In this build, we’ve implemented language injections for Twig custom tags and named blocks. To inject a language into named block or between custom tags, place caret inside {% customTag %} or {% block block_name %}, press Alt+Enter and select Inject language.

You can also create permanent injection rules in Settings|Editor|Language Injections by addition of Generic Twig rule. Just take a look at two predefined rules: block javascript and custom statement javascript.

twig_inject_3

Custom templates in Create New PHP Class dialog

To simplify the creation of different classes in a namespaced code we’ve extended New PHP Class dialog with the ability to select a custom PHP file template. That allows you to use ${NAMESPACE} variable in your template and take advantage of namespace completion and PSR-0/PSR-4 namespace detection during the creation of the class.

custom_class_template_2

Test methods generation

To avoid manual creation of test methods, we’ve implemented a method selector in Create New PHP Test dialog. You can select all, or just a couple of class method for which you’re going to provide tests and PhpStorm will generate you the test class and the test methods stubs.

new_tests

Codeception test generation

In addition to PHPUnit and PHPSpec tests, we’ve added Codeception Unit and Codeception Functional test types to Create New PHP Test dialog. That should simplify the creation of new Codeception tests, especially, with the feature described above: generation of test methods.

From the platform side the update brings:

  • Tasks: Shelve changes on context switching (IDEA-70996)
  • Display the content of unversioned files in the commit dialog (IDEA-156875)
  • Rest Client: support multipart/form-data (WEB-28563)
  • Docker: Add “Build” action for Dockerfiles (IDEA-172716)
  • Databases: Allow comparison of cells in data views(DBE-4582)

Apart from new features, this build has many bug fixes, including these:

  • “Make call dynamic” quick fix for static calls (WI-21620)
  • Find in Path dialog won’t close (Ubuntu 16.04) (IDEA-170103)

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

Download PhpStorm 2017.3 EAP 173.3188 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 | 3 Comments

PHP Annotated Monthly – October 2017

PHP Annotated Monthly Logo

PHP Annotated Monthly collects all the interesting articles from the month in one convenient place. Collected and curated by Gary Hockin, Developer Advocate for PhpStorm.

Continue reading

Posted in PHP Annotated Monthly | Tagged , , , | Leave a comment

Connecting to Deployment Servers and Remote Interpreters with SSH-Agent

When you work with remote servers, a common and recommended security measure is to use SSH key pairs for authentication.

Our friends at PyCharm have prepared a great blog post on the topic. It explains how to generate an SSH key pair, store the passphrase for the private key in the credential helper, and, in the end, how to connect to a remote Python interpreter over SSH using the generated key pair for authentication.

Before proceeding, make sure that you have a remote machine at hand to which you can connect over SSH using the generated key pair. Also, make sure to add your key to the credential helper application (SSH agent, Pageant, or a compatible tool). If you don’t have a spare remote machine, you can use the example Vagrant box provided as part of the above tutorial.

When ready, jump right into the PhpStorm specifics.

Continue reading

Posted in Cool Feature, Newsletter, Tutorial | Tagged , | 2 Comments

PhpStorm 2017.3 EAP 173.2941.8

The new PhpStorm 2017.3 EAP build (173.2941.8) is now available! You can download it here or via JetBrains Toolbox App. Or, if you have the previous PhpStorm 2017.3 EAP build (173.2463.17) 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.

Performance Improvements

We’ve been working hard on performance improvements in the last two EAPs and we’ve managed to decrease typing latency in the very complex PHP files. For example, we’ve measured the following changes in mPDF main file (38k lines, a mix of PHP/JS/HTML):

Min Delay (ms) Max Delay (ms) Average Delay (ms)
PhpStorm 2017.3 EAP 15.4 46.2 27.3
PhpStorm 2017.2 124.9 210.4 134.6

The measurement was performed using the amazing tool, Typometer, that captures the delay between key press action and its appearance on the screen. As you see the delays have decreased by a factor of 4.

The work is still in progress and we hope to boost performance even further.  If you have particular examples of files that are sluggish in PhpStorm, please comment or create an issue in YouTrack.

Composer Log

In this build, we’ve implemented a Composer Log console. Before all the messages about composer actions and related settings changes were shown in the Event Log, which was overwhelming and not always informative. Now we’ve made a dedicated Composer Log for all Composer related actions and notifications in the project. As a bonus, you can also rerun all actions right from the Log. The Composer Log can be opened from the composer.json editor panel or from the Event Log when you get a first Composer notification. Check it out and let us know what you think!

composer

From the platform side the update brings:

  • Better synchronization of your settings across devices (more details here)
  • Mocha test runner: support –watch option (WEB-11104)

Apart from new features, this build has many bug fixes, including these:

  • Parse exception while converting JSON to object class working with GitHub (IDEA-178764)
  • Only some foreign key edges are shown in the diagram (DBE-2130)
  • Postgres: Database console sets different timezone in session that PGAdmin (DBE-2996)

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

Download PhpStorm 2017.3 EAP 173.2941 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 | 8 Comments

PhpStorm Team at DrupalCon Vienna – September 2017

Our PhpStorm team is eager to meet you at DrupalCon Vienna (September 26-29).

drupalconViennaDrupalCon brings together thousands of people from across the globe who use, develop, design, and support the Drupal platform. The PhpStorm team is backing the event, and our team lead and developers will be waiting for you at the booth ready to help answer any questions that you might have. We will also be sharing information about future releases, showing demos, and chatting to you about anything you like.

Be sure to register for our free license raffle and grab one of our awesome yo-yos and other gifts. Even if you don’t win a free license, we’ll send you a discount toward a new personal one-year subscription to PhpStorm.

JetBrains team: Alexey Gopachenko (Project Lead), Elena Shaverdova (Software Developer), Svetlana Zemlyanskaya (Software Developer), and Gary Hockin (PhpStorm Developer Advocate).

See you soon!

Keep up with the latest PhpStorm news on our blog and follow us on Twitter @phpstorm.

 JetBrains PhpStorm Team
The Drive to Develop

Posted in Conferences & Events | Leave a comment

Editor-based Rest Client

Among other features introduced in 2017.3 EAP we mentioned the editor-based REST client, which offers a new approach to working with web APIs.

Earlier, you could run your requests with the REST client built right into PhpStorm, but it required crafting each request by hand with lots of button clicking, adding and completing of fields, and so on.

What if we wanted to leverage the power of the PhpStorm editor for the very same task, with completions, refactorings, navigation, VCS capabilities and what not? That’s where the new editor-based REST client comes in. No more fiddling with tool windows: your HTTP requests are now first-class citizens in PhpStorm.

Continue reading

Posted in Cool Feature, Newsletter, PhpStorm, Tutorial | Tagged | 21 Comments

PhpStorm 2017.3 EAP 173.2463.17

The new PhpStorm 2017.3 EAP build (173.2463.17) is now available! You can download it here or via JetBrains Toolbox App. Or, if you have the previous PhpStorm 2017.3 EAP build (173.2290.12) 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.

Support of nullability in refactoring

This build brings the support of nullability in “Extract Interface” and “Change Signature” refactorings. Support of nullability was introduced in PHP 7.1 and helps to avoid omitting type declaration or providing default null value for the function parameter for cases when you really want to pass or return null. Now PhpStorm will preserve nullability in case of “Extract Interface” refactoring and won’t trigger error when it notices nullable type in “Change Signature” refactoring.refactoring

Apart from new features, this build has many bug fixes, including these:

  • Run configurations dropbox should not change its width (IDEA-85375)
  • “Hide file extensions in editor tabs” removes all after dot (IDEA-176821)
  • Author field and Amend checkbox missing when only Unversioned files present (IDEA-169466)
  • Support for TypeScript 2.4+ dynamic import expression (WEB-28464)

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

Download PhpStorm 2017.3 EAP 173.2463.17 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 | 6 Comments

Taking control of PhpStorm updates

PhpStorm updates are usually patch-based: they are applied to the existing installation and only require you to restart the IDE. Due to the current limitations of the update system, these patches can only be applied sequentially, on top of one another. For example, if you are using PhpStorm 2017.1.1, you can patch it to 2017.1.2, but not to 2017.1.3.

If you skip or ignore a patch, you will lose the ability to apply the subsequent patches. As a result, when a new PhpStorm version is released, you will see a dialog box prompting you to download and install it:

ps_update_download

If this happens, you can restore the ability to apply patched-based updates by manually applying skipped updates one by one.

Follow these steps:

  1. Ignore the proposed update by clicking Ignore This Update. This way, you will add the proposed build’s number to the Ignored updates list.
  2. Open the PhpStorm Settings / Preferences dialog and navigate to Appearance and Behavior | System Settings | Updates.
  3. Click the Check Now button to check for available updates. If you only skipped a single update, the update dialog box will now prompt you to update and restart PhpStorm. Otherwise, keep ignoring the proposed updates until a patch-based update is proposed.
  4. Update and restart PhpStorm.
  5. Navigate back to the Updates settings page and click the View/edit ignored updates link to open the Ignored updates list.
  6. Delete the ignored build’s number from this list and check for available updates once more. The update that you have un-ignored will show up, and you can now apply it as a patch as well. Note that if you have ignored several updates, you need to remove and apply them one by one, starting from the oldest update.

A note for EAP users: you can update PhpStorm only to a minor EAP release, but not to the major one. For example, you can update PhpStorm 2017.2.3 to 2017.2.4 EAP but not to 2017.3 EAP. The 2017.3 EAP version in this case will be installed in parallel with your existing stable installation. EAP versions, however, can be updated to both newer EAP and stable PhpStorm versions.

Manage PhpStorm through Toolbox App

If you prefer a one-stop shop for managing all your developer tools, consider Toolbox App. It’s great for downloading and updating all your JetBrains developer tools, as well as launching your recent projects, from one convenient place. Maintain different versions of the same tool, install updates, and roll them back if needed. Toolbox App also remembers your JetBrains Account and uses it to automatically log you in when you install and register new tools.

To install Toolbox App, follow these steps:

  1. Download Toolbox App.
  2. Launch the downloaded file.
  3. When the installation is complete, accept the JetBrains Privacy Policy and sign in to your JetBrains Account.

ps_toolbox_manage

 

We hope it will help you to keep your PhpStorm updates under control and will make an update process more smooth and clear.

JetBrains PhpStorm Team
The Drive to Develop

Posted in Newsletter, Tutorial | Tagged | 6 Comments

PhpStorm 2017.2.4 is released

PhpStorm 2017.2.4 build 172.4155.41 is now available! It brings major bug fixes and performance improvements. See the full list of bug-fixes and improvements in our issue tracker and in the complete release notes.

You can download it here, in JetBrains Toolbox App or if you have installed the previous PhpStorm 2017.2.3 build (172.4155.25), you should soon get a notification in the IDE about a patch update.

JetBrains PhpStorm Team
The Drive to Develop

Posted in Early Access Program, Newsletter | 25 Comments