Changed the way to copy composer's vendors #585
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, here is the way Capifony copies dependencies in a new release :
It works pretty fine except for one case : if I decide to not sharing vendors anymore (by adding
vendor/
in:shared_children
) copying these (setting:copy_vendors
totrue
), while I have already deployed at least one release with the first configuration.In this case, my current release contains a symlink that points on
shared/vendor/
.Now, if I want to copy the dependencies and not sharing them to all releases, I will change my configuration like above.
Ok, but when I'll deploy my app, Capifony will copy the symlink of the current release into the new release, and
composer install
will actually occurs into the shared folder. This is the behaviour we have when sharing vendors.And all this causes known issues with rollback fails, downtimes on deployments... (IMO this is why sharing vendors is a very bad practise, and this deserves its place in the doc)
So changing my configuration is not enough in this case. I want to copy the content of the
vendor/
folder, not the symlink itself.This pull request suggest exactly that behaviour. It should break nothing for current users of this feature.