New PhpStorm 8: developing together. Support for Blade, Behat, WordPress, remote PHP interpreters and more

    Today we’ll talk about the release of PhpStorm 8 , the new version of the IDE for developing in PHP from JetBrains.

    As one of the PHP developer’s key tools, PhpStorm is constantly evolving and honing its built-in tools so that users can follow the latest web development trends (and sometimes ask them).

    The release of PhpStorm 8 simplifies the use of many popular and rapidly developing web technologies for backend and frontend development throughout the life cycle, from prototyping to deployment and support.

    PHP language support


    The power of language inserts

    The functionality of language inserts in PHP literals has been significantly redesigned: complex expressions are now supported, including the ability to replace dynamic parts with values.

    This is especially important for working with SQL queries in your project, which brings a significant increase in productivity when writing and testing database queries.

    Follow the evolution of PHP

    The recent release of PHP 5.6, which has become stable recently, is already fully supported in PhpStorm, including exponentiation, use const , use function , constant expressions, variadic functions, unpacking arguments, and many other language functions.

    With all the implemented language features, there is no reason not to upgrade your project to the latest version of PHP.

    Following PSR-0 / PSR-4 Standards on the Namespace Root

    Following the PSR-0 / PSR-4 code standards with PhpStorm is now even easier due to the fact that the new version includes support for source and test directories for PHP (Source & Test directories) with a comparison of the project structure and namespace (standard PSR-0); can define PSR-0 structure of a new project, or support the structure when creating a new class or refactoring; and also provides various code inspections.

    Feel the difference with the changes in each subsystem.

    With each new version of PhpStorm many product subsystems are recycled. This time we are pleased to introduce new intentions (desired actions) and code inspections, formatting improvements, type inference (including output based on ArrayAccess / Iterator return type), Markdown support in PHPDoc blocks and understanding of unified multi-level arrays.

    Frameworks


    Blade Templates

    The actively developing Blade template engine (introduced in the Laravel framework) is fully supported, including:
    • Blade syntax highlighting in template files;
    • autocompletion of directives;
    • implementation of variables for the for and foreach directives ;
    • Blade-specific project navigation
    • search for uses for templates;
    • custom Blade directives.


    WordPress Development with PhpStorm


    We have introduced full support for the popular blogging platform and WordPress CMS, which some time ago we already wrote on the hub during the early access program. Support currently includes:
    • PhpStorm integration with WordPress for existing projects and new plugins;
    • setting up a working environment for development for WordPress;
    • setting standards for WordPress code and following them;
    • support for hooks (including auto-completion for parameters of registering functions; navigation from functions that register hooks to calls of hooks and other functions);
    • search for documentation on WordPress.org directly from the editor;
    • integration with WordPress WP-CLI command line tools.



    Other frameworks

    Due to the imminent release of Drupal 8, we have supported the latest version at a support level similar to Drupal 6/7 support. And since Drupal 8 includes Symfony2 framework components, additional support for these components is provided by the Drupal Symfony2 Bridge open-source plugin.

    All major PHP frameworks are supported, so be sure to try PhpStorm to work with your favorite framework. Third-party plugins for additional framework support are available in our repository - for example, there are plugins for Symfony2, Laravel, Magento, CakePHP, etc.

    BDD for PHP with Behat


    Following the Behavior-Driven Development (BDD) paradigm is now easy, because PhpStorm supports Behat, a BDD framework for PHP. You can write human-readable test code that describes the behavior (and business logic) of your application.

    Current Behat support includes:
    • assistance in installing and configuring Behat;
    • Run Configuration for Behat (similar to PHPUnit);
    • Behat intellisense (resolve, search for uses, auto-completion, etc.).



    Remote PHP Interpreters


    Using a remote PHP interpreter instead of a local one will allow you to run an application or PHP tools in an environment close to production, whether it be a real server or a virtual machine created using Vagrant or Doсker. This approach allows you to make sure that deploying the application to production does not bring unpleasant surprises.

    Once the remote PHP interpreter is configured (using SSH authentication data, Vagrant settings, or deployment), you can use it to run / debug your application, and also remotely run testing tools (such as PHPUnit and Behat). PhpStorm will handle this remote interpreter in much the same way as the local one.

    Front End Development Tools


    PhpStorm includes all WebStorm features (so all WebStorm 8 features and current WebStorm 9 EAP features ) are included (some in the form of free plugins). We are pleased to present you an updated set of popular tools for web development:
    • extended support for AngularJS;
    • spy-js, a tracing tool for JavaScript and Node.js;
    • Grunt, a JavaScript task launcher
    • PhoneGap / Cordova integration
    • Bower, gulp.js, CucumberJS testing framework, Postfix JavaScript templates, etc.



    IntelliJ Platform


    The IntelliJ platform that underpins PhpStorm has also made many interesting changes.

    Multiple Cursors and Multiple Selection

    PhpStorm 8 includes one of the most requested features in our bug tracker - multiple cursors and multiple selection (Multiple Cursors and Selections).

    We will only say that you can place the cursors using Alt + Click ; add the following match to the selection: Alt + J for Windows and Ctrl-G for Mac; remove the match from the selection: Alt + Shift + J for Windows and Ctrl-Shift-G for Mac; delete all selections and cursors: Esc . And how it works in practice - you can see on the right.

    Work with single files without creating a project

    Quick changes to non-project files should mean quick fixes. And although it was always possible to add any file to an already open project, there was not one function: opening a single file without creating a project .

    With PhpStorm 8, quick changes to single files are possible: just open any file using the Open action on the PhpStorm Welcome screen. Experience with the IDE will be familiar to you - with code highlighting, inspections, code completion, and even debugging and deployment.

    In addition, you most likely will like the default Scratch plugin , which allows you to create temporary files without saving to disk ( Ctrl + Alt + Shift + Ins on Windows, Cmd-Shift-N on Mac).

    Where to read more?


    Of course, we did not have time to tell about all the innovations of PhpStorm 8 in this small habropost, therefore you can find additional information on our other resources.

    In our English-language blog and in the tutorial section, we have collected materials on most of the features described in this post (and many others). In addition, you may be interested in attending a webinar with our Developer Advocate Maarten Balliauw on October 7th - register here .

    What's next?


    Download the free 30-day trial version of PhpStorm 8 on the product page, where you can find out more about the new version if you wish .

    Upgrading to version 8 is free for anyone who has purchased a license after September 16, 2013.

    We will be very glad to see comments and suggestions on the new version in our bug tracker or in the comments below.

    And of course, follow PhpStorm on Twitter to stay abreast of our news!

    Program with pleasure!
    - JetBrains PhpStorm Team

    Also popular now: