Reputation: 19895
This is how I use composer and svn together:
In my development version, I run composer to download required packages to the vendor
directory. I then commit the vendor
directory to svn together with the rest of the development folder. The production build makes a copy of the vendor
folder.
I know, it is recommended not to commit the vendor
directory in svn (see SVN Repo in vendor with Composer), but I want to be safe for the case when a composer update
may break my application. It allows me to rollback everything in that case to the last stable state.
The problem with how composer works is that the checked out svn repo breaks, if composer deletes whole directories.
I would switch to the recommended practice and only check in composer.lock
and composer.json
into svn, if I knew how to rollback an eventual breaking composer update
. Can somebody explain this to me, please.
Upvotes: 2
Views: 347
Reputation: 4296
When you have composer.lock
and run composer install
(not update) you are sure that you'll get dependencies which are "locked" by you.
Running composer update
ignores entries in composer.lock
and tries to download latest dependencies allowed by composer.json
.
Upvotes: 1