Thanks for considering contributing to this project! Each contribution is highly appreciated. In order to maintain a high code quality, please follow all steps below.
Composer >= 2.1
PHP >= 8.1
# Clone repository git clone https://github.com/CPS-IT/project-builder.git cd project-builder # Install dependencies composer install
Please run all code analysis tools below to follow our CGL and maintain a consistent code style.
# All linters composer lint # Specific linters composer lint:composer composer lint:editorconfig composer lint:json composer lint:php # Fix all CGL issues composer fix # Fix specific CGL issues composer fix:composer composer fix:editorconfig composer fix:php
Run static code analysis#
# All static code analyzers composer sca # Specific static code analyzers composer sca:php
Please run all tests and make sure they are passing. If new code is added, it should be covered by appropriate test cases.
# All tests composer test # Docker tests composer test:docker # Unit tests composer test:unit # Unit tests with code coverage composer test:unit:coverage
View coverage report#
Code coverage reports are written to
.build/coverage. You can open the
last HTML report like follows:
Validate JSON schema#
composer create-project behavior#
composer create-project behavior can be simulated to test whether the
current project state works as expected.
This Composer script wraps the default behavior of
into a simulated directory, which is normally something like
.build/simulate_6299c0dda8600. The simulated directory will be shown after
simulation has finished.
An environment variable
PROJECT_BUILDER_SIMULATE_VERSION can be used to
override the project builder version during simulation. This is especially
useful when testing template packages that require a specific version of the
# Build and serve documentation composer docs # Build documentation composer docs:build # Serve documentation composer docs:serve # Open rendered documentation composer docs:open
When serving documentation, all changes to documentation files cause an immediate re-rending. You can view the documentation at http://127.0.0.1:8080.
Submit a pull request#
This project follows Semantic Versioning.
Once you have finished your work, please submit a pull request and describe what you’ve done. Ideally, your PR references an issue describing the problem you’re trying to solve.
All described code quality tools are automatically executed on each pull request for all currently supported PHP versions and Composer versions. Take a look at the appropriate workflows to get a detailed overview.