How to downgrade Composer via homebrew?

Using Mac to develop PHP applications without Docker might be tricky sometimes. A useful thing to know is how to easily change your Composer version, following this tutorial you might be able to upgrade or downgrade to any version.

Downgrade Composer

The first thing to check is the versions available to you, running this command below you will be able to see and select which version you want to migrate to.

brew log composer
Downgrade Composer with Brew on macOS

Then install Composer and change the version, doing the downgrade directly via Composer command.

brew install composer
composer self-update 1.10.15

What’s the Composer purpose

Composer is an application-level package manager for PHP that provides a standard format for managing dependencies of PHP software and required libraries. Composer is strongly inspired by Node.js package manager npm, and the Ruby one called bundler.

You can run Composer from the command line and installs dependencies. It also allows users to install PHP applications that are available on Packagist, using the main repository containing available packages.

Thanks!

If you or your team is struggling with your development workflow using Composer, please don’t hesitate to let me know. We might be able to evolve your development process by seeing how your processes are set up.

This post was a question and answer that I created in the Apple StackExchange.

About me

Picture of Rafael Corrêa Gomes

Rafael Corrêa Gomes

Senior e-commerce developer and architect based in Montreal, Canada. More than ten years of experience developing e-commerces, saas products and managing teams working with Magento, Shopify, PHP, JavaScript, and NodeJS.