Jordi Boggiano and Nils Aderman are the original authors of Composer, a near-universal package and dependency manager for PHP, and it just hit a major milestone: Composer 2.0. The two join us in this episode to give us the download on Composer 2 improvements and updates.
But first, Nils helpfully defines Composer for us. “Composer is a package manager, or as we sometimes refer to it, a dependency manager. It’s responsible for installing and managing your project’s different versions of dependent packages.”
The Packagist-Composer relationship
How does Packagist tie into Composer? Nils explains, “Composer is the command-line tool, or potentially the code inside it, that can be used as a library for integration into some web servers. And Packagist is the server, the registry, the repository for packages that you can download.”
Composer’s unique features and predictability
Composer is not the first or the most recent language package manager on the market, but it does some things really well that other packages don’t.
In addition to the log file, our guests say predictability is a very deliberate component of Composer. Nils says, “Overall, the tools behaving in as predictable a way as possible is something that we agree on. I don't want to have to sit there and think, “Why the hell did it do this? I don't understand.” And then I have to read the docs for a couple of hours just to understand what is going on.”
Composer 2.0 improvements
The most common issues in Composer 1 were memory and performance issues. The performance issue has definitely been resolved in Composer 2; as Jordi says, “In Composer 2, the performance is so much faster and uses so much less memory. The numbers vary a bit, but there is a huge reduction of runtime and memory usage.”
In addition to the performance overhaul, upgrading to Composer 2.0, also comes with:
Platform.sh is a robust, reliable hosting platform that gives development teams the tools to build and scale applications efficiently. Whether you run one or one thousand websites, you can focus on creating features and functionality with your favorite tech stack.