Reputation: 887
I use composer to manage packages. But I delete one of files from package (I use composer status -v
to check this).
Is it possible to restore changed/deleted files to it base (installed) state via composer (composer install doing nothing in my case) ?
Thanks.
ps. It's look like there no way to restore separate file from repo, after his been changed/deleted. Of course, it's possible to delete entire vendor dir, and reinstall some package totally.
Upvotes: 0
Views: 2384
Reputation: 2037
I edit dependant package source code all the time and run into the issue of my local being out of sync with the remove source.
When things get really sideways and nothing works: delete the package providers dir inside the ./vendor (exp: ./vendor/author-name). Then composer will see the package is missing when running composer install
. It will re-download the version specified in composer.lock.
If you want the latest version of all the packages when re-installing; composer update
is what you want.
I also recommend using -o -vvv
to generate the AuoLoader file and provide verbose output.
Upvotes: 2