phpcomposer-php

Can I use composer without installing it?


I've noticed on a lot of open source user systems, like UserFrosting or Drupal they some how use composer, without the user actually having to install composer on to there server. I was just wondering how would I be able to do this, I've had a look around and can't find anyway of just using the files.

Thank you.


Solution

  • Yes, you could simply download the composer.phar file, and run it from CLI like:

    cd ~/
    wget https://getcomposer.org/composer.phar
    php composer.phar [command]
    

    You'll need at least PHP v5.6.x and the mcrypt extension installed for the CLI SAPI.