Contributing

Visit github.com/sandrokeil/interop-config/ for the project website.

  • Make sure you have execute composer install
  • Be sure you are in the root directory

Resources

If you wish to contribute to interop-config, please be sure to read to the following resources:

If you are working on new features, or refactoring an existing component, please create an issue first, so we can discuss it.

Running tests

To run tests execute phpunit:

$ ./vendor/bin/phpunit

You can turn on conditional tests with the TestConfig.php file. To do so:

  • Enter the test/ subdirectory.
  • Copy TestConfig.php.dist file to TestConfig.php
  • Edit TestConfig.php to enable any specific functionality you want to test, as well as to provide test values to utilize.

Running PHPCodeSniffer

To check coding standards execute phpcs:

$ ./vendor/bin/phpcs

To auto fix coding standard issues execute:

$ ./vendor/bin/phpcbf

Running benchmarks

To run benchmarks execute phpbench:

$ ./vendor/bin/phpbench run --report=aggregate

Generate documentation

To generate the documentation execute bookdown:

$ ./vendor/bin/bookdown doc/bookdown.json

Composer shortcuts

For every program above there are shortcuts defined in the composer.json file.

  • check: Executes PHPCodeSniffer and PHPUnit
  • cs: Executes PHPCodeSniffer
  • cs-fix: Executes PHPCodeSniffer and auto fixes issues
  • test: Executes PHPUnit
  • test-coverage: Executes PHPUnit with code coverage
  • docs: Generates awesome Bookdown.io docs
  • benchmark: Executes PHPBench