Skip to content
Advertisement

Can composer.phar be deployed with the code?

I’m using Composer for a small project. I’ve pushed composer.json and composer.lock to Git, and put the vendor/ folder into .gitignore, so I can install the dependencies at the server on deploy time.

Can I push composer.phar to the Git repo or should I install a new copy for the server? Not sure if the installation process is machine-dependant.

Advertisement

Answer

It’s a lot easier to install composer.phar manually on each server where you need it, as it will prompt to be updated every 30 days, and you don’t want to be forever updating the content of your repo for a composer update.

Composer is a tool to help you with your deployments, so it should not be a part of your deployments

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement