This is for people who want to contribute to the project.
First of all, you need to fork the repository and clone it locally. After that, we've prepared a Docker setup to help you get started quickly.
Install docker and docker compose (or the older version docker-compose) on your machine, then run the following commands:
Tip
If you use a Mac with ARM architecture (M1, M2, etc.), you may need to modify the docker-compose.yml file. Please don’t commit the changes to this file, keep them on your local environment.
docker-compose up --detachInstall the dependencies with composer:
docker-compose exec php composer installInstall the lowest dependencies with composer:
docker-compose exec php composer update --prefer-lowestNow you can execute the tests with the following command:
docker-compose exec php ./vendor/bin/phpunit --process-isolationIf one test fails, run it without the --process-isolation option
docker-compose exec php ./vendor/bin/phpunit tests/Test/ConfigMongodbTest.phpYou can also use the --filter option to run tests matching a class and name:
docker-compose exec php ./vendor/bin/phpunit --process-isolation --filter=ConfigSqliteTest::testAppendFixturesYou can also use the --filter option to run tests matching a name:
docker-compose exec php ./vendor/bin/phpunit --process-isolation --filter=testAppendFixturesIf you change the version of PHP or dependencies, the caches may cause issues, they can be deleted:
docker-compose exec php bash -c "rm -rf tests/App*/var/cache/*"Use it through Docker:
docker run --rm -it --volume .:/app --workdir /app jakzal/phpqa:1.116.2-php8.4-alpine php-cs-fixer --config=./.qa/.php-cs-fixer.dist.php --diff --no-interaction --ansi fix --show-progress noneUse it through Docker:
docker run --rm -it --volume .:/app --workdir /app jakzal/phpqa:1.116.2-php8.4-alpine phpstan analyse --configuration ./.qa/phpstan.neon --no-progress