Contributions are welcome.
If you want to support another static analysis tool then please read Adding support for new static analysis tools / formats.
Given SARB's use case it will probably be used with older code bases. For that reason the aim is to keep supported PHP versions and dependencies as wide as possible.
SARB must support all PHP versions that are either in active or security support.
Support for out of date versions of PHP should only be dropped if it is too difficult to keep them.
Please make sure that the code runs on the following PHP versions:
- 8.0
- 8.1
- 8.2
- 8.3
SARB's main dependencies are Symfony Components. SARB must work with all currently supported Symfony versions (maintained and security fixes).
Unless there is a very good reason do NOT add any other libraries.
After writing your code run code style fixer, this will automatically format the code to the project style:
composer cs-fix
Check all the CI tasks would run. NOTE you'll need to download the deptrac PHAR, see instructions:
composer ci-<php version>
# e.g.
composer ci-8.1
In addition to the above code coverage needs to 100%.
Documented usage of @codeCoverageIgnore
is allowed for the cases for lines of code where it is impossible to get test coverage.
A docker file has been provided to help with development.
Build the image:
docker compose build
Start the services
docker compose up -d
You can run composer command. E.g. To run composer cs-fix
on PHP 8.2
docker compose exec php82 composer cs-fix
See the composer scripts section for all scripts available.
You can also get shell access. E.g. to get shell access on PHP 8.3:
docker compose exec php82 bash