Not up to date with Composer 2 yet? Check the alpha1 changelog and alpha2 changelog, alpha3 changelog and RC1 changelog and especially the UPGRADE guide first.
Try it out now and get ready for the upcoming stable release
composer self-update --previewto try the latest RC version (2.x).
composer self-update --snapshotto try the latest dev build (2.x).
composer self-update --stableto go back to stable releases (1.x for now).
composer self-update --1in CI/scripts if you want to pin Composer to 1.x until you are ready to migrate, this will ensure you stay on 1.x releases even once a 2.0 stable comes out.
Between RC1 and RC2 we only had to do a few fixes and mostly added a couple things to help plugin authors do their job more easily. This means 2.0 is already quite stable and we see it used in the wild quite a bit. The current plan is to release a 2.0 final before end of October. It is almost 100% compatible with Composer 1 with the exception of plugins, so please do try it ASAP and report any regression you find. The lock files from v1 can be used by v2 and vice-versa, so don't worry about that.
- Breaking: Removed
OperationInterface::getReasonas the data was not accurate
- Added automatic removal of packages which are not required anymore whenever an update is done, this will purge packages previously left over by partial updates and
- Added shorthand aliases
COMPOSER_DEBUG_EVENTS=1env var support for plugin authors to figure out which events are triggered when
PreFileDownloadEventand fixed a cache bug for integrations changing the processed url of package archives
Composer\Util\SyncHelperfor plugin authors to deal with async Promises more easily
$composer->getLoop()->getHttpDownloader()to get access to the main HttpDownloader instance in plugins
- Added a non-zero exit code (2) and warning to
removecommand when a package to be removed could not be removed
dump-autoloadcommand) flag to let people use apcu autoloading in a deterministic output way if that is needed
- Fixed version guesser to look at remote branches as well as local ones
- Lots of minor bug fixes and improvements