Skip to content

Latest commit

 

History

History
60 lines (37 loc) · 1.99 KB

File metadata and controls

60 lines (37 loc) · 1.99 KB

Contributing

First of all, many thanks to spend your time on this library!

Workflow

  1. Fork susina/param-resolver repository, clone it locally and apply your patches.
  2. Run the test suite by composer test command and fix all red tests.
  3. Run static analysis tool by composer analytics command and fix all errors.
  4. Fix the coding standard by running composer cs:fix.

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 Pest and we provide a script to launch it:

composer test

Code Coverage

We provides three commands to print the code coverage report or to generate it in html or xml format:

  • composer coverage to print a coverage summary on your console
  • 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

To prevent as many bugs as possible, we use a static analysis tool called Psalm. To launch it, run the following command:

composer analytics

After its analysis, Psalm outputs errors and issues with its suggestions on how to fix them.

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

If you want to learn more about our code style, see https://github.com/susina/coding-standard.