Skip to content

Latest commit

 

History

History
72 lines (47 loc) · 2.18 KB

CONTRIBUTING.md

File metadata and controls

72 lines (47 loc) · 2.18 KB

Contributing

Before you contribute code, please make sure it conforms to the PSR-2 coding standard and that the unit tests still pass. The easiest way to contribute is to work on your own fork.

If you do this, you can run the following commands to check if everything is ready to submit.

Dependencies

In order to load the dependencies, you should run composer:

composer install

PSR-2 Specs

This package follows the PSR-2 coding standard.

To test if your contribution passes the standard, you can use the command:

./vendor/bin/phpcs --standard=phpcs.xml

Which should give you no output, indicating that there are no coding standard errors.

Unit testing

You can write your own tests and add them to the tests directory.

To run the test command:

./vendor/bin/phpunit --configuration phpunit.xml --coverage-text

Which should give you no failures or errors.

A coverage and logs will be created in the build directory.

In order to give support to older versions, you should test it also with the lowest composer packages:

composer update --prefer-stable --prefer-lowest

Branching and pull requests

As a guideline, please follow this process:

  1. Fork the repository.
  2. Create a topic branch for the change:
    • New features should branch from develop.
    • Bug fixes to existing versions should branch from master.
    • Please ensure the branch is clearly labelled as a feature or fix.
  3. Make the relevant changes.
  4. Squash commits if necessary.
  5. Submit a pull request to the develop branch.

Please note this is a general guideline only. For more information on the branching structure please see the git-flow cheatsheet.