Installing composer

Posted under » PHP » Drupal » CakePHP updated on 27 Sep 2021

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you. To install. Some software that uses composer are symfony, cakephp, PHPMmailer and guzzle among others.

This is somewhat similar to the Python's pip.

In Ubuntu, all you need to do is sudo apt-get install composer. In this doesn't work... try the official documents from composer. If Centos 7, use this guide.

Once installed run the composer command. eg

$ composer create-project drupal/recommended-project:10.0.2 "install-dir"

You can update your software too eg.

$ composer update "drupal/core-*" --with-all-dependencies
$ composer require drupal/core-recommended:10.0.2 drupal/core-composer-scaffold:10.0.2 drupal/core-project-message:10.0.2 --update-with-all-dependencies

web security linux ubuntu python django git Raspberry apache mysql php drupal cake javascript css AWS IOT