Composer All-in-One is a part of PHP Tools extension. Although it can be installed separatelly from the Composer extension page.
Composer.json Editor & IntelliSense
composer.json editor is extended with smart actions, code lenses, tooltips, and IntelliSense to autocomplete packages and versions from packagist.org.
Completion of Package Names
Code completion searches packages and lists their names with detailed information including downloads, favorites, abandoned information, and description. There are also quick links to the package home page, package source code, and packagist page.
Completion of Package Versions
Available minor versions are fetched from packagist listed in code completion after the required package name:
Installed package details are displayed in the tooltips.
remove package right from the editor, using the code actions:
Installed Version Inlay
Actual installed version is displayed connveniently next to the package required version:
"scripts" section of
composer.json gets a small code-lens allowing to quickly run the corresponding script, right from the editor:
Diagnostics & Abandoned Packages
The extension watches for installed packages and checks if any of them isn't abandoned. Abandoned packages are listed in VS Code's problems view, strikethrough, and the tooltip shows the corresponding abandoned message:
Integrated commands work with the
composer.json in the workspace root directory. If necessary, commands ask which workspace folder you're referring to. It allows quickly
remove, or search for packages from packagist.org, and more.
The following commands are usually executed as a VSCode task, using
php executable as configured in the
composer.phar downloaded automatically when necessary (so it is not necessary to install it by yourself).
composer: require command shows quick-pick with online search, and installs the selected package. The search displayed all the important information including packages description, downloads, and favorites.
Requires a dev package; this works the same as
composer: require but the packageis installed as a development dependency.
Removes installed package or more packages from the project. The command shows quick pick with multi-selection allowing to choose the packages to be removed:
composer: create-project ...
Open an empty folder in VS Code, and create a new project from a composer package. The command shows quick-pick that searches online for available packages and invokes the
create-project command for you:
composer: search ...
Search packages on packagist.org. Quickly browse through packages, read descriptions, open details on packagist.org or
require the package right from the quick pick menu.
composer: run-script ...
Quickly run your composer script from command palette:
composer: update the internal composer.phar
The extension automatically downloads the latest composer installation, and uses it for all the tasks and commands. Run
composer: update the internal composer to manually re-download the latest snapshot.
Shows the about information.
composer: archive ...
archive command, and asks for arguments.
Clear the internal composer cache.
Shows your required packages funding options.
Shows summary of your required packages licenses.
Shows list of outdated packages.
VS Code task that executes a
composer command is a useful way of configuring and running composer. The
composer.phar itself is automatically installed, and
php executable is determined from
The extension provides schema validation for
composer.json files, maintained by @composer.
- correctness validation.
- tooltips and code completion for
If there's an existing installation of
composer.phar under the following paths, it's used as it is:
.composer/composer.pharunder user's home (Linux, OsX)
Otherwise, the extension automatically downloads
composer.phar latest snapshot, uses it, and keeps it updated. The location respects the Composer default installation path which can be changed by setting the
COMPOSER_HOME environment variable.
|The value is used to determine
php executable path for running composer commands. If not set,
"php" is used by default.
In case, there is PHP Tools extension installed, composer commands are executed using
php set with PHP Version Picker.
|The relative path for the composer.json