This project provides a convenient dock script to simplify local development workflows within Docker containers.
You can use this script to initialize the project, manage Composer dependencies, and run tests in a consistent PHP environment.
- Docker installed and running
- A
.envfile (created automatically via thedock initcommand, if it doesn’t already exist)
Use the following commands to set up the project:
sh dock initUpdate the Composer dependencies:
sh dock composer updateThis command runs PHPUnit inside the Docker container, using the PHP version specified in your .env file.
You can modify or extend this script to include additional tests or commands as needed.
sh dock testRun the test suite with all versions of php:
sh test.shBefore starting development, verify that your .env file contains the correct settings.
You can specify which PHP version to use for local development, debugging, and Composer operations by updating these variables in your .env file:
PHP_VERSION=8.1
PHP_DEBUG=8.1
PHP_COMPOSER=8.1Make sure these values reflect the PHP versions you intend to use.
If the .env file does not exist, run the sh dock init command to create one from the .env.example template.