Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.
1. Import a Composer Project
Workspace > Import Project... wizard from the main menu. Enter the URL for the source code management system, e.g. Git.
A project name will be suggested automatically.
Import button. The project’s source will be downloaded into the workspace.
When done, the wizard will switch to the
Project Configuration page. Select the
Composer project type.
Save button. The Composer dependencies will be installed automatically.
Look at the Composer console panel for the output of the Composer process.
2. Create a PHP Project from Composer Package
Workspace > Create Project... wizard from the main menu. Enter a project name.
Next button. The wizard will switch to the
Composer Package Information page.
Enter the name of the desired package to create the project from, e.g.
Create button. The project’s source will be downloaded from Packagist and the Composer dependencies will be installed automatically. The output of the Composer process can be seen in the Composer console panel.
3. Edit the composer.json File
Double-click on the project’s composer.json file to open it in the JSON editor.
4. Execute Composer Commands
The Composer tool is globally available in the PHP stack. So it is easy to execute Composer commands directly from the Terminal panel.
Visit the Composer documentation for the command reference.