Do you need to run Composer on localhost and in production?

I am new to Composer (getcomposer.org) and did not know how this works if I install the package locally using Composer and then push my codebase to my production server using Git. Should I run Composer again on a production server?

amuses J

+4
source share
2 answers

When setting up your project, you add your dependencies to your composer.json file in the local project directory.

, . , composer.lock .

Composer , /vendor, script composer.lock.

, , composer.json composer.lock.

, , , .

, #. . , , .

, , - , , , , , , . , , - , , . , -, , , , , .

, , , .

, composer.lock ( ), , .

, gitignore. , , , . git, PITA, , , , .

+7

, . , getcomposer.org, "vendor" , . "vendor" , .

, , . git, .

https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies.

"vendor" git , , , ,

0

Source: https://habr.com/ru/post/1529467/


All Articles