Skip to content

Latest commit

 

History

History
85 lines (50 loc) · 3.02 KB

CONTRIBUTING.md

File metadata and controls

85 lines (50 loc) · 3.02 KB

Contributing

The project follows the Open Knowledge International coding standards.

All PHP Code MUST conform to PHP-FIG accepted PSRs.

Flow Framework has a nice guide regarding coding standards:

Getting Started

  1. Clone the repo
  2. Run the tests
$ composer install
$ composer test

Phpunit - for unit tests

Travis

Phpunit is used for unit tests, you can find the tests under tests directory

Running Phpunit directly: vendor/bin/phpunit --bootstrap tests/autoload.php tests/

Coveralls - for coverage

Coveralls

when running composer test phpunit generates coverage report in coverage-clover.xml - this is then sent to Coveralls via Travis.

Scrutinizer-ci - for code analysis

Scrutinizer-ci

Scrutinizer-ci integrates with GitHub and runs on commits.

It does static code analysis and ensure confirmation to the coding stnadards.

At the moment, the integration with frictionlessdata repo is not working, you can setup a Scrutinizer-ci account for your fork and run against that.

php-cs-fixer - code style check & autofix

php-cs-fixer can be used to check and fix code style

you need to manually install it, then you can run : composer style-check or composer style-fix

Publishing a release and updating Packagist

Packagist SemVer

updating frictionlessdata schemas

The json schemas for the frictionlessdata specs are stored locally as part of the package.

They might change from time to time, to donwnload the latest specs run composer update_registry

Testing with a local copy of tableschema-php

Add the following to composer.json

"repositories": [
    {
        "type": "path",
        "url": "../tableschema-php"
    }
]

Run composer require "frictionlessdata/tableschema @dev"