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:
- Clone the repo
- Run the tests
$ composer install
$ composer test
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/
when running composer test
phpunit generates coverage report in coverage-clover.xml - this is then sent to Coveralls via Travis.
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 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
- Publish a release (using SemVer) on GitHub
- go to https://packagist.org/packages/frictionlessdata/datapackage
- Login with GitHub which has permissions
- click "Update"
- all releases from GitHub appear as releases on Packagist
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
Add the following to composer.json
"repositories": [
{
"type": "path",
"url": "../tableschema-php"
}
]
Run composer require "frictionlessdata/tableschema @dev"