Search code examples
phpcomposer-phpdependency-management

How to install a specific version of package using Composer?


I am trying to install a specific version of a package using Composer. I tried composer install and composer require but they are installing the latest version of the package. What if I want an older version?


Solution

  • composer require vendor/package:version

    for example:

    composer require refinery29/test-util:0.10.2