Skip to content

Latest commit

 

History

History
66 lines (43 loc) · 2.09 KB

File metadata and controls

66 lines (43 loc) · 2.09 KB

Contributing

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.

Workflow

  1. Fork pomodocs/commonmark-alert repository.
  2. Install all the dependencies via Composer: composer install.
  3. Install the development tools in tools directory via Phive: phive install.
  4. Run the test suite by composer test command and fix all red tests.
  5. Run static analysis tool by composer analytics command and fix all errors.
  6. 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.

Running the Test Suite

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 test

Code Coverage

We provide two commands to generate the code coverage report in html or xml format:

  • composer coverage:html command generates a code coverage report in html format, into the directory coverage/
  • composer coverage:clover generates the report in xml format, into clover.xml file.

Static Analysis Tool

We use PhpStan as static analysis tool. To launch it, run the following command:

composer analytics

Coding Standard

We ship our script to easily fix coding standard errors, via php-cs-fixer tool. To fix coding standard errors just run:

composer cs:fix

and to show the errors without fixing them, run:

composer cs:check