Development Environment

Requirements

  • PHP >= 8.2 with the zip, dom and fileinfo (and optionally apcu, memcached, redis) extensions

  • NPM for front end asset serving and bundling

  • Docker and Docker Compose for running the local development container

  • Git for version control

Instructions

These instructions are for setting up a local DEVELOPMENT environment. If you are looking for basic installation instruction see the Installation page instead.

  1. Clone Directory Lister to a local repository

    git clone {{ REPOSITORY_URL }}
  2. Switch to the Directory Lister directory

    cd /path/to/DirectoryLister
  3. Install and build PHP and JavaScript dependencies

    composer install
    npm install
    npm run dev
  4. Run the local Docker container

    docker-compose up -d
  5. Add a host name entry to /etc/hosts (optional)

    127.0.0.1  directory-lister.local

You should now be able to access your local Directory Lister installation at http://localhost (or http://directory-lister.local if you added a host name entry)

Common Development Commands

Many common development actions have been defined in the Makefile and can be run with make command.

Clear the application cache

make clear-cache

Build dependencies and assets (for production)

make production

Clear built assets

make clear-assets

Run test suite

make tests

Check or fix coding standards

make coding-standards

This will apply coding standard fixes will be automatically. See the Compor or Manual tab to report coding standard problems without modifying files.

Perform static analysis

make static-analysis

Generate code coverage report

make coverage

Code coverage requires a code coverage engine (e.g. xdebug pr pcov) to run.

Last updated

Was this helpful?