To run tests locally, please make sure you have docker up and running. You also need PHP 8.2 and composer to be available from your CLI. Even though we are supporting 3 PHP versions at the time, we are using the lowest supported one for development, currently it's PHP 8.2.
HEADS UP - instead of using php installed on your host machine, consider using Nix Shell. You can find detailed instructions how to use Nix in the Nix Development Environment section.
cp compose.yml.dist compose.yml
composer install
docker compose up -dFor the code coverage, please install pcov.
Pcov extension is not mandatory, and tests are going to pass without it; however, you won't be able to run mutation tests.
composer testAbove command will run all tests, including those that require custom extensions. In case you want to run tests only for a specific part of the project, you can use:
composer test:core
composer test:lib:doctrine-dbal-bulk
composer test:lib:parquet
composer test:adapter:csv
composer test:bridge:symfony-http-foundationcomposer static:analyzeImportant static analyze MUST be executed at the lowest supported PHP version
and with dependencies locked by composer.lock.
Please make sure to use PHP 8.2 and that you used the composer install command first.
Before committing your code, please make sure that your code is following our coding standards.
composer cs:php:fixThis command will automatically fix all coding standards issues in your code. If you want to first check what needs to be fixed, you can use:
composer static:analyze:cs-fixer
composer static:analyze:rectorThis command will execute exactly the same tests as we run at GitHub Actions before a PR can get merged. If it passes locally, you are good to open a pull request.
composer build Since documentation for DSL and our entire API is automatically generated, you can build it by running:
composer build:docs
composer build:docs:apicomposer build:docs must be executed after any adjustments to functions.php files (DSL).
composer build:phar
./build/flow.phar --versionIn order to build docker image and load it to local registry please use:
docker buildx build -t flow-php/flow:latest . --progress=plain --loadUsage:
docker run -v $(pwd):/flow-workspace -it flow-php/flow:latest --version