First of all, many thanks to spend your time on this library!
Warning
To contribute to this library, you should have installed on your computer:
- PHP >= 8.3 with mbstring extension
- Phive phar manager
To avoid conflicts between dependencies, we use Phive to install the development tools (PhpStan and Php-cs-fixer) as phar archives, into the tools directory.
- Fork pomodocs/commonmark-alert repository.
- Install all the dependencies via Composer:
composer install. - Install the development tools in
toolsdirectory via Phive:phive install. - Run the test suite by
composer testcommand and fix all red tests. - Run static analysis tool by
composer analyticscommand and fix all errors. - Fix the coding standard by running
composer cs:fix.
Tip
We provide a check command for all the previously described actions:
run composer check before submitting a pull request.
While developing, the test part is very important: if you apply a patch to the existing code, the test suite must run without errors or failures and if you add a new functionality, no one will consider it without tests.
Our test tool is PhpUnit and we provide a script to launch it:
composer testWe provide two commands to generate the code coverage report in html or xml format:
composer coverage:htmlcommand generates a code coverage report in html format, into the directorycoverage/composer coverage:clovergenerates the report in xml format, intoclover.xmlfile.
We use PhpStan as static analysis tool. To launch it, run the following command:
composer analyticsWe ship our script to easily fix coding standard errors, via php-cs-fixer tool. To fix coding standard errors just run:
composer cs:fixand to show the errors without fixing them, run:
composer cs:check