IntelliJ IDEA 2017.2 Help


File | Settings | Languages and Frameworks | PHP | Composer for Windows and Linux
IntelliJ IDEA | Preferences | Languages and Frameworks | PHP | Composer for macOS


The page is available only when the PHP and the Command Line Tool Support plugins are enabled. The plugins are not bundled with IntelliJ IDEA, but they can be installed from the JetBrains plugin repository as described in Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling Plugins. Once enabled, the plugins are available at the IDE level, that is, you can use them in all your IntelliJ IDEA projects.

On this page, enable execution of Composer Dependency Manager commands through the dedicated user interface and appoint the default composer.json for the IntelliJ IDEA project.

Path to composer.json In this text box, specify the location of the composer.json that you want to use as default. All the Composer commands invoked from Tools | Composer on the main menu will be executed in accordance with the settings from this configuration file.

You can have several composer.json files in one IntelliJ IDEA project. For each composer.json, actions are invoked from its context menu in the editor or in the Project view.

Add packages as libraries Use this check box to configure the open-for-edit status of Composer packages. To protect packages under vendor/*/* against editing, leave the check box selected (this is the default setting).
If you want to edit Composer packages under vendor/*/*, clear the check box.
Configure the PSR roots for autoload
  • If the namespace structure in your project complies with PSR-4 and PSR-0, clear the check box.
  • If you use custom namespace structure, leave the check box selected.
Learn more about PSR and autoload from the Composer official website.
PHP interpreter Choose one of the configured PHP interpreters from the list. See Configuring Remote PHP Interpreters for details.
Path to composer.phar In this text box, specify the location of the composer.phar archive.
Click here to download from Click this link to 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.

See Also

Last modified: 18 July 2017