Tutorial – How to install composer to your PHP project

Tutorial - How to install composer to your PHP project

Composer

The simplest way is probably to get it via this download link and install it: https://getcomposer.org/Composer-Setup.exe

If you want to install it via command line please dont forget to add composer to PATH, if you’re new to putting variables into PATH, it’s quite easy.
Read about it here: https://hendrikthurau.enterprises/tutorial-how-to-add-system-user-variables-add-to-path-in-environment/

The GIT project can be found here: https://github.com/composer/getcomposer.org/blob/master/web/installer
If you’re using linux you can install via command line.

Installation via command line:

php -r “copy(‘https://getcomposer.org/installer’, ‘composer-setup.php’);”
php -r “if (hash_file(‘sha384’, ‘composer-setup.php’) === ’48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5′) { echo ‘Installer verified’; } else { echo ‘Installer corrupt’; unlink(‘composer-setup.php’); } echo PHP_EOL;”
php composer-setup.php

php -r “unlink(‘composer-setup.php’);”


That’s it you’re done. Easy, isn’t it?
1 rating, 1 vote1 rating, 1 vote (+1 rating, 1 votes, rated)
You need to be a registered member to rate this.
Loading…

Leave a Comment

Your email address will not be published. Required fields are marked *

Free Instant SEO Audit

Powered by

CONTACT US

Scroll to Top