symfonygit-revertvendorscomposer-php

Composer revert packages


I am building a new app in Symfony 2.1. I am using a lot of bundles pulled in using composer. A lot of these bundles have problems with this latest version of Symfony and I am having to go into the /vendor folder to identify the issues.

This means that I am changing the vendor files directly - purely for testing purposes. (When we have fixed a bundle we branch and submit appropriate pull request).

What I want to know is if there is some command like composer.phar revert which would undo any changes made to the vendor folder (like a git checkout). At the moment if I run a composer update or installit does not do this.

Thanks


Solution

  • composer install, if you have kept your composer.lock file, will revert all your vendors to the previously installed state.