Runtime Composer utilities composer-runtime-api 2 0 introduced a new vendor composer platform_check php file, which is included automatically when you include the Composer autoloader It verifies that platform requirements (i e php and php extensions) are fulfilled by the PHP process currently running
Composer platform dependencies Invocations of the Composer autoloader are considered the application "runtime" Starting with version 2 0, Composer makes additional features (besides registering the class autoloader) available to the application runtime environment Similar to composer-plugin-api, not every Composer release adds new runtime features, thus the version of
Composer Bumped composer-runtime-api and composer-plugin-api to 2 2 0; UX Change: Added allow-plugins config value to enhance security against runtime execution, this will prompt you the first time you use a plugin and may hang pipelines if they aren't using --no-interaction (-n) as they should (#10314)
Upgrade guides for Composer 1. x to 2. 0 composer-plugin-api has been bumped to 2 0 0 - you can detect which version of Composer you run via PluginInterface::PLUGIN_API_VERSION; PluginInterface added a deactivate (so plugin can stop whatever it is doing) and an uninstall (so the plugin can remove any files it created or do general cleanup) method
Composer Bumped composer-runtime-api and composer-plugin-api to 2 1 0; UX Change: The default install method for packages is now always dist zip, even for dev packages, added --prefer-install=auto if you want the old behavior (#9603)
Composer Fixed composer-runtime-api support on Composer 1 x, the package is now present as 1 0 0; Fixed support for composer show --name-only --self; Fixed detection of GitLab URLs when handling authentication in some cases
Composer Added a composer-runtime-api virtual package which you can require (as e g ^2 0) to ensure things like the InstalledVersions class above are present It will effectively force people to use Composer 2 x to install your project
Vendor binaries and the vendor bin directory - Composer If you want to rely on this in your package you should however make sure to also require "composer-runtime-api": "^2 2 2" to ensure that the package gets installed with a Composer version supporting the feature
Composer Why can't Composer load repositories recursively? API Docs If you need to work with composer as a library you may also want to check out the source
Basic usage - Composer To start using Composer in your project, all you need is a composer json file This file describes the dependencies of your project and may contain other metadata as well It typically should go in the top-most directory of your project VCS repository