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?

7 s
7

composer require vendor/package:version

for example:

composer require refinery29/test-util:0.10.2

Leave a Comment