How to install a specific version of package using Composer?
And how to get list of all installed packages along with version in composer?
composer require vendor/package:version
composer require guzzlehttp/guzzle:6.3.3
This is very important when you are going to migrate one module of codes from one application to another application and want to have the same version installed in the new place.
How to get list of all installed packages along with version in composer?
And you can also use the global instalation of composer:
composer global show
Can we diagnose installed packages?
We can run following
Let’s run that.
As you see there is a warning! Since we use exact version of guzzle and we have to use semantic versioning for guzzle.
For solving this problem I just replace ~6.0 with 6.3.3 in composer.json and do following to upgrade guzzlehttp
composer update guzzlehttp/guzzle