
There is a new class, Composer\InstalledVersions, which is autoloaded in every project and is available at runtime. This is enabled by default so make sure you read up on it to avoid surprises. We added a platform-check step when vendor/autoload.php gets initialized which checks the current PHP version (and optionally extensions) match what is expected by your dependencies and fails hard otherwise. This will avoid leaving you with a half-updated vendor directory if a network error occurs midway through installation.
Cannot updat storyo 2.0 install#
The current local state of the vendor directory will not interfere in updates anymore.Īfter an update is complete, the install process is run automatically and it will now execute all network bound operations first - and in parallel if possible. The way dependency updates are done internally was refactored, which, for you, will result in more deterministic updates. Time for initial update + install (bootstrapped project, empty cache) shows roughly 60% less time used by Composer 2 with ext-curl enabled Architectural changes and determinism

But I am sure you will be positively surprised if you haven't tried Composer 2 yet.Īs a side note to this, require/ remove and partial updates are now much faster because Composer will now only load the metadata of the packages which are being changed. The difference depends on your use case, so while I've seen reports of improvements of over 50% to both in some projects, I cannot put an exact number on it.

This leads to massive improvements in terms of both speed and memory usage. We overhauled pretty much everything from the protocol used between Composer and to the dependency resolution, including downloading files in parallel using curl and constraint evaluation optimizations. The list of changes and improvements is long, check the complete changelog if you are interested in reading it all.
