Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 1.39 KB

CONTRIBUTING.md

File metadata and controls

50 lines (39 loc) · 1.39 KB

Contributing

Locale Setup (Docker)

Steps to test the code (using PHPUnit) are following:

  1. Install PHP and required extensions
  2. Download/Install composer
  3. Install Docker
  4. Setup docker containers (continue reading)
  5. Run tests with "composer test"

The following is a list of commands to be given on the host machine to setup docker containers.

Setup a PostgreSQL database:

docker run -d -p 5432:5432 \
--name gishiki-postgres \
-e POSTGRES_PASSWORD=vagrant \
-e POSTGRES_USER=vagrant \
-e POSTGRES_DB=travis \
postgres:10.1-alpine

Setup a MySQL database:

docker run -d -p 3306:3306 \
--name gishiki-mysql \
-e MYSQL_ALLOW_EMPTY_PASSWORD=yes \
-e MYSQL_DATABASE=travis \
mysql:8.0.3

Then you are ready to test the framework:

composer install # mandatory: download dependencies
export COMPOSER_PROCESS_TIMEOUT=600 # give testing some time to process
composer test

Coding Style

Source code of Gishiki must be following PSR-2 specification.

Guideline

You can improve the framework by applying a pull request on the GitHub repo.

When adding new source code you have to provide PHPUnit tests to cover at least 90% of new source.

New Classes

When adding a new class you must provide your full name and, optionally, your email address.