PHPUnit composite configuration scope

PhpStorm 2018.2 comes with an extra level of flexibility for working with PHPUnit tests. Previously, you could run either a single method in a class, or all methods at once. Now, PhpStorm also lets you run an arbitrary selection of tests.

To get started, right-click your test target, that is, a class or a method being tested, and invoke Go To | Test or press Control+Shift+T (⇧⌘T for macOS). Then, select several tests to be executed by using Ctrl ( for macOS) and Shift keys.

To run your selection, use the provided keyboard shortcut (Control+Shift+F10 for Windows and ⌃⇧R for macOS):

selecting_tests_to_run

Continue reading

Posted in Cool Feature, Newsletter | Tagged , , , | 1 Comment

PhpStorm 2018.2.2 EAP 182.4129.18

It’s a start of Early Access Program for PhpStorm 2018.2.2, a minor update for the recently released PhpStorm 2018.2. A fresh build 182.4129.11 is available here, in JetBrains Toolbox App or, if you have installed PhpStorm 2018.2 and have “Early Access Program” channel selected in Settings->System Settings->Updates, you should soon get a notification in the IDE about a patch update.

This build delivers bug fixes and improvements for PHP and the Web, and takes on the latest improvements in IntelliJ Platform.

Continue reading

Posted in Early Access Program | 3 Comments

HTTP Client Enhancements

We continue improving the editor-based HTTP client, and PhpStorm 2018.2 brings several useful enhancements to it: you can now use environment variables inside the request body, apply code formatting to POST request bodies, and enjoy built-in Unicode support.

Let’s take a closer look at these new features.

Continue reading

Posted in Cool Feature | Tagged , | 2 Comments

Simplified CodeSniffer and MessDetector Setup

PHP Code Sniffer and PHP Mess Detector are the proven tools for ensuring that your code is clean, consistent, and conforming to the chosen coding standards.

In PhpStorm 2018.2, we’ve simplified setting up of these tools to the point that almost no setup is actually required. The paths to Code Sniffer and Mess Detector are now automatically detected from composer.json – in the same way as it happens for PHPUnit or Behat.

Continue reading

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

PhpStorm 2018.2.1 is released

PhpStorm 2018.2.1 build 182.3911.43 is now available! You can download it here or in JetBrains Toolbox App. If you have installed the previous PhpStorm 2018.2 or PhpStorm 2018.2.1 EAP build (182.3911.19), please invoke the Check for updates action to receive the latest update.

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

Continue reading

Posted in Newsletter, Release Announcements | 8 Comments

New inspections in PhpStorm 2018.2

Every PhpStorm release brings new inspections among other features, and PhpStorm 2018.2 is no exception.

The new inspections will detect extensions that are not listed in composer.json, highlight the non-canonical order of elements in PHPDoc annotations, and warn you when an optional parameter is used in a method declaration before the required one.

Let’s take look at them in more detail.

Continue reading

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

Move Instance Method Refactoring

When you need to move a method across the class hierarchy, PhpStorm provides you with several facilities for this. For example, you can move some functionality between a class and its parent using the Pull Up/Push Down refactorings. Or you can use the Make Static refactoring in combination with Move Static Method to move a method to a different class.

To cover the cases when a method cannot be made static or moved across the class hierarchy, PhpStorm 2018.2 introduces a new Move Instance Method refactoring.

As its name states, the new refactoring allows moving an instance method to a parameter class or to a field class. Why use it after all? The primary reason is reducing the dependency between classes. If your method uses the data mostly contained in a different class, it probably makes sense to keep the method itself there, too, for simplicity and better consistency. See here for more theory behind this.

Continue reading

Posted in Cool Feature, Newsletter | Tagged , | 1 Comment

PhpStorm 2018.2.1 EAP 182.3911.19

It’s a start of Early Access Program for PhpStorm 2018.2.1, a minor update for the recently released PhpStorm 2018.2. A fresh build 182.3911.19 is available here, in JetBrains Toolbox App or, if you have installed PhpStorm 2018.2 and have “Early Access Program” channel in Settings->System Settings->Updates, 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 takes on the latest improvements in IntelliJ Platform.

Continue reading

Posted in Early Access Program | Leave a comment

Fully Qualified Class Name Completion

In PhpStorm 2018.2, code completion comes with an extra perk: When searching for a class, you can now provide the class namespace in the suggestion list, in addition to the class name itself.

So, to locate, for example, an \Illuminate\Routing\Console\MakeControllerCommand  class, you don’t have type or invoke completion separately for each part of its FQN. Simply type something as simple as “IRCM” and have the сlass matched and suggested to you:

Run suite

You can customize the way completion works on the Editor | General | Code Completion preferences page. By default, completion will only match the first letter’s case, so, typing “Ircm” for the above example will do the trick and suggest the proper class.

competion_preferences

Depending on what works better for you, you can choose All letters, which will require typing “IRCM” (or “IRoCoM”), or disable case matching altogether: in this case, typing “ircm” is sufficient.

PhpStorm 2018.2 is now available! You can download it here or via JetBrains Toolbox App.

Your JetBrains PhpStorm Team
The Drive to Develop

Posted in Cool Feature | Leave a comment

PhpStorm 2018.2 is now released!

PhpStorm 2018.2, the second major update for PhpStorm in 2018, is now available! You can download it here or via JetBrains Toolbox App.

Our website has all the details of this release, and here’s a roundup of the notable highlights.

800x400_blog

PHP Language

  • Custom postfix completion templates
  • FQCN completion
  • Structural Search and Replace for PHP
  • Improved SQL Injections
  • The new presentation for Quick Documentation
  • Jumping outside closing bracket/quote with Tab
  • New Inspections and Quick Fixes

PHP Refactorings

  • Move Instance Method Refactoring
  • New Add @method tag quick fix for Undefined method
  • Add method quick fix now inserts parameter type hints

PHP Tools

  • Simple CodeSniffer/MessDetector setup
  • PHPUnit composite configuration

HTTP Client

  • Support for environment variables in the request body
  • Support for POST request body formatting

Please see our issue tracker for the full list of fixed PHP-related issues, and release notes from all previous EAP builds.

PhpStorm 2018.2 also brings major improvements in its support for web technologies, such as new JavaScript intentions, completion for events in Vue.js, Typescript 2.9 and 3.0 support, the new Code Coverage feature that helps to find unused code, extract and convert React component refactoring, new integrations with Angular CLI, global file
watchers, rerunning failed tests, and much more.

IntelliJ Platform has provided this release with lots of new features as well as bug-fixes. Specifically, updated UI with brand new icons, dark title bars on macOS, and TouchBar support for MacBooks, as well as improved VCS support with new ways to resolve merge conflicts, enhancements in VCS Log, support for multiple GitHub accounts, and even more.

Database tools have been improved with the new SQL formatter, source code migration, query plan diagram, custom data sources and more.

For more details please see What’s New in PhpStorm 2018.2 and download a free 30-day PhpStorm trial for your operating system.

PhpStorm 2018.2 is available as a free update for everyone who has an active subscription for PhpStorm or All Products!

JetBrains PhpStorm Team
The Drive to Develop

Posted in Newsletter, Release Announcements | Tagged | 31 Comments