Manage Phing build targets
Accessing Phing Build tool window
Phing functionality in PhpStorm is provided through a dedicated Phing Build tool window.
Open a Phing build file in the editor or select it in the Project tool window, and then choose Add as Phing build file from the context menu of the selection.
Choose
from the main menu. The tool window can be accessed after you have opened it through the context menu of a Phing build file in the editor or in the Project tool window.
Examining the build targets defined in a build file
Open the Phing Build tool window. The window shows all the build files as nodes.
Depending on your goal, do one of the following:
To view the build targets defined in a specific build file, expand the corresponding node by clicking next to the build filename. Note that this expanding does not affect the targets marked as hidden.
To fold or unfold the build targets defined in all build files, click respectively the Expand All button or the Collapse All button on the toolbar. Note that unfolding does not affect the targets marked as hidden.
To navigate to the definition of a target in the source code, select the desired target and choose Jump to Source from the context menu of the selection.
Hiding targets
Among the targets defined in a build file, you may have some that are only called by other targets and are never run alone. You can suppress showing such targets in the build file tree by marking them as hidden.
Hidden targets do not become visible when you expand the node of a specific build file or click Expand All button .
You can mark a target as hidden both directly from the Phing Build tool window or from the Phing Settings dialog. However, the hidden status can be removed only through the Phing Settings dialog.
Depending on your goal, do one of the following:
To mark one or several build targets as hidden, do one of the following:
In the Phing Build tool window, select the targets under their build file node and choose Mark to Hide from the context menu of the selection.
Select the build file in which they are defined and click the Settings Preferences button on the toolbar. Then in the Phing Settings dialog that opens, switch to the Hiding targets tab and select the Hide checkboxes next to the targets to be hidden.
To remove the hidden status of a target:
Select the build file in which it is defined and click the Settings Preferences button on the toolbar.
In the Phing Settings dialog that opens, switch to the Hiding targets tab where the Hide checkboxes next to the names of the hidden targets are selected. Clear the Hide checkboxes next to the targets for which you want the status hidden removed.
Associating a shortcut with a Phing target
You can associate a build target with a keyboard shortcut and execute commonly-used targets with a single key-stroke. If a Phing build file is added to the project, its targets appear under the Phing Targets node in the Keymap dialog.
In the Phing Build tool window, right-click the desired build target.
From the context menu, choose
.In the Keymap dialog that opens, configure the shortcut as described in Configure keyboard shortcuts.
Appointing targets for execution before running or debugging
Open the Phing Build tool window.
Select the desired target and choose Before Run/Debug from the context menu of the selection.
In the Execute Target Before Run/Debug dialog that opens, select the configurations before which you want the target executed.