Deploy Friday: hot topics for cloud technologists and developers

#40: Composer 2 and Packagist

August 28, 2021 Larry Garfield, Shawna Spoor, Jordi Boggiano, Nils Aderman Season 1 Episode 40
Deploy Friday: hot topics for cloud technologists and developers
#40: Composer 2 and Packagist
Show Notes

Composer 2.0

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.

  • Handles automatically releasing packages with tags
  • A predictable log file 

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:

  • Internally refactored dependency updates and automatic installs
  • Error reporting improvements

Try Packagist on Platform.sh

Platform.sh
Learn more about us.
Get started with a free trial.
Have a question? Get in touch!

Platform.sh on social media
Twitter @platformsh
Twitter (France): @platformsh_fr
LinkedIn: Platform.sh
LinkedIn (France): Platform.sh
Facebook: Platform.sh

Watch, listen, subscribe to the Platform.sh Deploy Friday podcast:
YouTube
Apple Podcasts
Buzzsprout

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.