PhpStorm 2016.2 Help

Composer

File | Settings | Languages and Frameworks | PHP | Composer for Windows and Linux
PhpStorm | Preferences | Languages and Frameworks | PHP | Composer for OS X
Ctrl+Alt+S

settings

The page is available only when the PHP and the Command Line Tool Support plugins are enabled. The plugins are bundled with PhpStorm and activated by default. If the plugins are not activated, enable them on the Plugins page of the Settings / Preferences Dialog as described in Enabling and Disabling Plugins.

On this page, enable the use of Composer Dependency Manager through the dedicated user interface by specifying the paths to the PHP engine installation and to the composer.phar archive to look for Composer commands in.

When the file analyses is completed, PhpStorm returns to the Command Line Tools page of the Settings dialog bos where the specified file is added to the list of command line tools available in PhpStorm.

ItemDescription
Path to PHP executable In this field, specify the location of the PHP engine installation folder. Choose the PHP installation from the list, or type the path manually, or click the Browse button browseButton.png and choose the desired location in the dialog box that opens.
Path to composer.phar In this text box, specify the location of the composer.phar archive. Type the path manually or click the Browse button browseButton.png and choose the desired location in the dialog box that opens.
Click here to download from getcomposer.org Click this link to have PhpStorm download composer.phar from the official storage and specify the folder to store the archive in. This instance of Composer will be available in the current project only. To use it in the command line mode, configure it as a command line tool.
Path to composer.json In this text box, specify the location of the composer.json for listing descriptions of the project dependencies. Type the path manually or click the Browse button browseButton.png and choose the desired location in the dialog box that opens.
Add packages as libraries
  • Select this check box to have PhpStorm mark Composer packages added to the current project as libraries..

    In the context of PhpStorm, any file marked as library is automatically write-protected. Library files are indexed for the only purpose which is enhancing coding assistance (i.e. code completion, syntax highlighting, navigation, and documentation lookup). Library files are not to be edited in the scope of the project where they are declared as library.

    By default, the Add packages as libraries check box is selected, which automatically blocks the possibility to edit them in the current project.

  • Clear the check box if you want to use Composer packages in your development and at the same time update them yourself within the scope of the same project.

See Also

Last modified: 24 November 2016