PhpStorm 2019.1

TwigテンプレートとBladeテンプレートをデバッグ、到達不能コードを識別
3月 29, 2019
新バージョン

機能

Debug Twig and Blade Templates

  • With PhpStorm and Xdebug, you can now do step-debugging in original uncompiled .twig and .blade.php files of these two popular template engines. All debugging benefits are available here: see the context, local and global variables, add watches, run step-by-step, and more.

Locate Dead Code

  • Now PhpStorm detects redundant code and highlights classes, class members, and functions that are probably never used. The Unused declaration inspection takes into account dynamic usages of the code, for example via magic methods.

Refactorings, Intentions & Quick-Fixes

  • String Juggling Toolbox - Added multiple new intentions for manipulating strings. You can now convert string concatenation to interpolation, convert a concatenation or interpolation to a sprintf call, copy a concatenated string to the clipboard, and do many other things. Press Alt+Enter on a string to see the available actions.
  • Remove Unused Variable - PhpStorm 2019.1 introduces a new quick-fix that helps you get rid of the unused variables that appear in assignments’ or closures’ use lists. The quick-fix is smart enough to detect situations when the assignment expression may have side effects.
  • Move To Class Refactoring - With the new Move to Class refactoring, you can transit functions or constants to the Class they logically belong to, and PhpStorm will find and modify all usages for you. You can move multiple functions simultaneously by selecting them in Structure tool window.
  • Method May Be ‘static’ Inspection - If a class has a method that doesn't use any instance references, PhpStorm will detect it and offer a handy quick-fix: press Alt+Enter on the method, and make it static. All the usages will be updated automatically.

Docker

  • Reuse Containers - For interpreters based on Docker Compose, you can now choose between docker-compose run or docker-compose exec for executing containers. If you have a heavy container that you don’t want to restart on each test run, you may reuse it by choosing the docker-compose exec option. Or you can use docker-compose run for lightweight containers or those not working in daemon mode (that is, stopping right after they start).

PHP

  • Improved Autocompletion - With the help of a special file, .phpstorm.meta.php, PhpStorm is now able to suggest arguments and return values better. This is to cover situations when, instead of some simple type like integer or string, you would like to see a certain set of constants suggested. Or if you expect some function to return a certain constant. You can also improve suggestions in PhpStorm for your library or project by providing your own .phpstorm.meta.php file.
  • Reworked Imports - Reworked the inspections and intention actions related to namespaces importing and using FQN. The main idea behind them is to avoid qualifiers as much as possible. Now, PhpStorm will let you simply remove a redundant qualifier if possible, or replace it with the corresponding ‘use’ import statement. Also, when you paste some code into a file, PhpStorm will ask to reuse an existing alias.
  • Code Cleanup - In PhpStorm 2019.1, the Code Cleanup tool comes with PHP-specific intentions: it can optimize full class name occurrences by either adding the ‘use’ statement or removing the unnecessary part from it. It can also automatically fix code style issues with PHP CS Fixer or PHP_CodeSniffer’s phpcbf.

Web Technologies

  • All the features and improvements of WebStorm are available in PhpStorm, either out of the box or with free plugins available in the repository.
  • Updated docs and browser compatibility - The documentation (F1) for CSS properties and HTML tags and attributes now shows up-to-date descriptions and information about the browser support from MDN as well as links to the full MDN articles. Also, to check that all the CSS properties you use are supported in the target browser version, you can enable a new Browser compatibility inspection in preferences.
  • Improved support for TypeScript in Vue apps - PhpStorm now leverages the TypeScript language service together with its own TypeScript support for TypeScript code in .vue files. This means you’ll now get more accurate type checking and type info, be able to use the quick-fixes provided by the service, and see all the TypeScript errors in the current file in the TypeScript tool window.
  • New inspections for Angular apps - For Angular applications, PhpStorm adds 17 new inspections that will help you detect Angular-specific errors in your app as you type, and will suggest appropriate quick-fixes. Working both in the TypeScript and template files, these inspections will check your use of bindings, directives, components, and many other things.
  • New debugger console - Meet the new, improved interactive debugger console in the JavaScript and Node.js debug tool windows! It now displays objects using a tree view, and it supports styling of log messages with CSS and grouping them using console.group() and console.groupEnd(). You can also filter out any type of log messages.
  • Convert function with Promise to async/await - You can automatically change a function that returns a Promise with .then() and .catch() calls to an async function that uses the async/await syntax. Simply press Alt-Enter on the name of the function and select Convert to async function. This is possible not only in TypeScript files, but also in JavaScript and Flow.

IDE

  • Recent Locations Popup - In this new navigation popup, you’ll find recently visited code points presented with a context - a couple of lines before and a couple of lines after. All the locations are chronologically ordered in this popup, with the last visited location at the top. To call up the new Recent Locations popup, press Cmd-Shift-E / Ctrl+Shift+E. Type in any text to search within the context.
  • VCS Improvements - A new ‘Uncheck all’ checkbox for partial Git commits lets you uncheck all the code chunks at once, and then choose the ones you want to commit. In addition, fixup, squash, and cherry-pick actions are now available right in the Git log.
  • Improvements in Database tools
  • Custom UI Themes - If the default white and Darcula themes are not enough for you, try Dark Purple or create a custom one! The color of any element of your IDE, from icons to radio buttons to arrows, is now configurable. Fine-tune everything to your liking and save it as a new theme plugin.

Database Tools

  • Support for new databases: Greenplum, Vertica, and Apache Hive.
  • Code completion supports combined statements for CREATE and DROP.
  • Support for DEFINER attributes in MySQL and MariaDB.
  • Support for the Oracle mode in MariaDB.
  • You can now set the default folder for a project.

Other Improvements

  • New coloring options for primitive parameter types and class members by visibility. You can configure the color scheme in Preferences | Editor | Color Scheme | PHP.
  • You can now enable soft-wraps in the editor for specific file types. To do this, open Preferences/Settings | Editor | General and specify the file types in the ‘Soft-wrap files’ field.
  • PHPDoc styling configuration is improved: sort use statements, define the order of tags, and customize the number of spaces. To find all the options, go to Preferences | Editor | Code Style | PHP and look for the PHPDoc tab.
Debug Twig and Blade Templates

PhpStorm

リファクタリング、コード補完、実行時のコード分析、コード記述の生産性を向上する機能満載のPHP統合開発環境

PhpStormは、次の製品にも含まれています。

ご質問がありますか?

今すぐ JetBrains ライセンススペシャリストとライブ チャット