Composer Setup Guide

This guide will help you install and configure Composer for the LIS system.

Step 1: Download Composer

Composer is a dependency management tool for PHP that allows the LIS system to manage its required libraries.

Download the latest version of Composer:

Download Composer
Note: Composer is available for Windows, macOS, and Linux. The installation process differs slightly for each operating system.

Step 2: Install Composer

Windows:

  1. Download and run the Composer-Setup.exe installer
  2. Follow the installation wizard instructions
  3. Make sure to select the option to add PHP to your PATH environment variable if prompted

macOS and Linux:

  1. Open a terminal
  2. Run the following commands:
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');"
sudo mv composer.phar /usr/local/bin/composer
Important: The hash verification line (sha384) may change as new versions of Composer are released. Always check the official Composer website for the latest installation instructions.

Step 3: Verify Installation

To verify that Composer has been installed correctly:

  1. Open a command prompt (Windows) or terminal (macOS/Linux)
  2. Run the command: composer --version
  3. You should see output similar to: Composer version 2.5.8 2023-06-09 17:13:21
Note: If you see "command not found" or similar, Composer is not properly installed or not in your PATH.

Step 4: Install Dependencies for LIS System

After installing Composer, you need to install the dependencies for the LIS system:

  1. Open a command prompt or terminal
  2. Navigate to the LIS system root directory (where composer.json is located)
  3. Run the command: composer install
  4. Wait for Composer to download and install all dependencies
cd /path/to/lis/system
composer install
Important: This step must be performed by someone with appropriate permissions to the LIS system directory.

Troubleshooting

Composer Not Found

Permission Issues

Dependencies Not Installing