HF PanelDocsv1.0.0

Composer

Run composer install, update, dump-autoload or validate for a PHP project, as your account with your website's PHP.

The Composer screen installs and updates a PHP project's packages with Composer. It runs as your account, with your website's PHP version, and you follow each run live.

Where: Control Panel › Software › Composer

Composer screen

Choose the project folder

  1. Pick the website at the top (when you have more than one).
  2. Under Project folder, check Folder with composer.json — a folder inside your home, for example web/example.com. It is usually the folder above public_html or public, where composer.json is; HF Panel suggests that folder at first.
  3. Click Save folder if you changed it.

The card then shows what the folder holds — composer.json (found or missing), composer.lock (found or missing) and vendor/ (installed or not installed yet) — plus the Composer version, the PHP version and the time and memory limits your hosting provider allows for each run.

Run a Composer command

  1. Under Run Composer, choose the Command:

    Command What it does
    composer install installs the versions in composer.lock (use this on a live site)
    composer update gets the newest versions composer.json allows and writes composer.lock
    composer dump-autoload rebuilds the optimised autoloader only
    composer validate checks composer.json and composer.lock
  2. Leave --no-dev ticked to leave out the packages only needed for development (not shown for validate).

  3. Click Run composer ….

A window shows the output while Composer runs. The folder you typed is saved for the website. The button is switched off while composer.json is missing.

Last run

Last run shows whether the last command Finished or Failed, the command and folder, when it ran and how long it took — or the error.