New Rename refactoring features in PhpStorm 2.0

Rename refactoring is one of the basic types of refactoring, and PhpStorm supports it since the early builds. This post will let you know about the new rename refactoring features available in PhpStorm 2.0!

Advanced options for renaming named entities

Rename refactoring is extended through different rename options. When you try to rename an element using rename refactoring, the element-specific options are shown in the Rename dialog.

  1. Search for references
    Available for: File
    Sometimes we need just to rename a file without renaming references to it. Disable the “Search for references” option to have only the file renamed.
  2. Rename accessors
    Available for: Field
    Enable this option and getters/setters will be renamed automatically.
  3. Rename containing file
    Available for: Class, Interface
    Usually the name of a class corresponds with the name of the containing file. Keep this option enabled to preserve this naming convention.
  4. Rename parameters in hierarchy
    Available for: Method parameter
    Enable this option to preserve the names of parameters in hierarchy.
  5. Rename inheritors
    Available for: Class, Interface
    The name of an inheritor often contains the name of its parent. This makes the code more clear. Enable this option to keep your code сlear and easy to understand.

Rename Heredoc/Nowdoc delimiters

Heredoc/Nowdoc delimiters are not kind of named entities and haven’t any references, but rename refactoring can help you quickly change label text according to PHP syntax rules.

Get PhpStorm 2.0 EAP and make your code better!

This blog is permanently closed.

For up-to-date information please follow to corresponding WebStorm blog or PhpStorm blog.

 
This entry was posted in Cool Feature, PhpStorm and tagged , , . Bookmark the permalink.

3 Responses to New Rename refactoring features in PhpStorm 2.0

  1. drm says:

    I’ve been using the 2.0 EAP ever since it came available, and I love its features. Great work guys, I recommend this IDE to anyone doing serious web development with PHP and the client side lot.

  2. Belkin says:

    thanks :) any info when you will add support of Symfony command line?

  3. Hi Guys,

    great work, a very good IDE.

    Thank You

Comments are closed.