What to do when composer fails to update your vendor packages?

Comparing #10 with #19

Category

How-toTutorials

Tags

Yyii2, yii2, composer, corrupt, update, package, reinstall

Content

Problem Statement ----------------- DoHave you faced some of these problems when using composer with your Yii installation?

- Running a `composer update` does not fetch any new packages (even though the source is updated)
[...]
Normally you need to check the package sources and if your network connectivity is stable when doing a composer update. But in most such cases above (even though rare), you may need to refresh and reinstall your composer packages.

The normal approach is to reinstall packages. DIn order to reinstall packages using composer, you can do the following: 1.**Step 1:** Backup your `vendor` folder under your app root, and delete all files in the `vendor` folder, except `.gitignore` if it exists.
 
2.
  
 
**Step 2:**
Backup your `composer.lock` file on your app root, and delete it.
 
3.
  
 
**Step 3:**
Run the following command from your application root:.

~~~
php composer.phar install --prefer-dist
~~~
[...]