IntelliJ IDEA
 
Get IntelliJ IDEA

Move Namespace Dialog

Last modified: 26 May 2024

The dialog is available only if the PHP plugin is installed and enabled. The PHP plugin is not bundled with IntelliJ IDEA, but it can be installed on the Settings | Plugins page, tab Marketplace, as described in Installing plugins from JetBrains Marketplace.

The dialog opens when you select a PHP namespace to be moved and select Refactor | Move from the main menu or from the context menu of the selection.

IntelliJ IDEA assumes that the namespaces in your project are arranged in compliance with the PSR-0/PSR-4 standard and enforces you to retain the folder structure and the namespace hierarchy in accordance with this standard when moving namespaces.

When you specify a namespace to move a namespace to, IntelliJ IDEA automatically updates the Target Destination Directory field, which shows the path to the folder that corresponds to the namespace in question.