A
A
Anton2014-05-23 16:42:12
PHP
Anton, 2014-05-23 16:42:12

Using Composer in a Project

I have a local project where the framework is loaded via composer. Deployment to the server is done using the IDE, there are too many files (docs, readme, etc.) in the vendor folder. Of course, I put them in an exception, but still it's all very long, although the framework is small.
Such a question: how to develop, deploy, use composer correctly, mb even using git?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Pavel Solovyov, 2014-05-23
@pavel_salauyou

nothing in the vendors folder should be deployed, remove it completely from git and add it to ignore.

A
Alexander Zelenin, 2014-05-23
@zelenin

the vendor folder must be in the exceptions, on the server you need to run composer install (not update), which will install the same version from composer.lock as on the dev machine (update will update and you will have different versions of the framework).

C
cent4auka, 2014-06-01
@cent4auka

Doesn't it bother anyone that the deployment will take place as a result in two stages? (git pull and composer install)
You added a new tool to your project, added features, and tested it. Deployment time.
git pull in production.
And composer won't be able to download a new tool (the reasons can be different, from Internet lags, to ddos ​​github (from which composer will try to download packages) )
The case may be rare, but if it happens, you can butt in.
If production updates are done only through git, this is reliable. If everything is downloaded - deployed, if something does not download, because of the Internet or something else, then the update will not deploy.
I want to protect myself as much as possible from sudden hits. You can, of course, roll back the commit if the composer is down - but this is not a good option when they start asking you why the task was completed, but it is not in production.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question