One of the more exciting improvements included in Magento 2.4.2 is the support of Composer 2.0. In our tests, this brought a substantial speed increase and less memory usage to Composer commands run against your Magento project code.
How do you benefit from this?
Once you are ready to use Magento 2.4.2 check if you are already using Composer 2.0 by running
composer --version. If you are still on the 1.x release you might see something like this:
First update to the latest 1.x version with
composer self-update followed by
composer self-update --2 to get to Composer 2.x (2.0.9 at the time of writing).
If you have used the excellent plugin hirak/prestissimo to bring parallel downloads to Composer now would also be the time to remove it if you had it installed globally. It is no longer required as Composer now supports this out of the box.
composer global remove hirak/prestissimo
In particular in a Docker for Mac environment have I seen a dramatic overall performance increase. While I don't have any exact timings, overall it went from painfully slow to easy to work with.
Fooman repositories are 2.0 ready
All Fooman hosted Composer repositories have also been upgraded with the Magento 2.4.2 release to support the new Composer 2.0 format alongside the Composer 1.0 format.