I added a package in the require
block of my composer.json
.
I do a composer install
and it says Nothing to install or update.
In my understanding, composer update
would work but I shouldn't do that because it updates the versions of the other packages to the latest, but I haven't tested my code on them.
How do I install that new package?
The Command Line.
You don't have to add the new packages manually to your composer.json
file and then do a composer install or update
. Use The Command Line
Installing new packages from the command line automatically adds it to your composer.json
file and it does not update previously installed packages.
From the project root, simply run:
composer require package/name
Hope it helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With