Skip to content

Latest commit

 

History

History
52 lines (36 loc) · 1.95 KB

CONTRIBUTING.md

File metadata and controls

52 lines (36 loc) · 1.95 KB

Contributing

We accept contributions via Pull Requests on Github.

Pull Requests

  • Code must follow PSR-1, PSR-2 Coding Standards - The easiest way to apply the conventions is to install PHP Code Sniffer and run it.

  • Add tests! - Your patch won't be accepted if it doesn't have tests. Run PHPUnit to make sure, that all tests pass.

  • Document any change in behaviour - Make sure the README.md and any other relevant documentation are kept up-to-date.

  • Consider our release cycle - We try to follow SemVer v2.0.0. Randomly breaking public APIs is not an option. Update CHANGES.md accordingly.

  • One pull request per feature - If you want to do more than one thing, send multiple pull requests.

Make shortcuts

If you have GNU Make installed, you can use following shortcuts:

  • make cs (instead of php vendor/bin/phpcs) - run static code analysis with PHP_CodeSniffer to check code style
  • make csfix (instead of php vendor/bin/phpcbf) - fix code style violations with PHP_CodeSniffer automatically, where possible (ex. PSR-2 code formatting violations)
  • make test (instead of php vendor/bin/phpunit) - run tests with PHPUnit
  • make install - instead of composer install
  • make all or just make without parameters - invokes described above install, cs, test tasks sequentially - project will be assembled, checked with linter and tested with one single command

Running Tests

$ make test

or

$ composer test

Happy coding!