A PHP library containing common functionality for working with JWTs witin Serato Web Services web applications.
To include this library in a PHP project add the following line to the project's
composer.json
file in the require
section:
{
"require": {
"serato/jwt": "~1.0"
}
}
See Packagist for a list of all available versions.
This library requires PHP 7.1 or above.
Please ensure code adheres to the PHP-FIG PSR-2 Coding Style Guide
Use PHP_CodeSniffer to validate your code against coding standards:
$ ./vendor/bin/phpcs
Use PHPStan for static code analysis:
$ vendor/bin/phpstan analyse
Configuration for PHPUnit is defined within phpunit.xml.
To run tests:
$ php vendor/bin/phpunit
See PHPUnit documentation for more options.
The Sami PHP API documentation generator can be used to generate PHP API documentation.
To generate documentation:
$ php sami.phar update phpdoc.php
Documentation is generated into the docs\php
directory.
Configuration for Sami is contained within phpdoc.php.
If you have phpdbg installed you can generate a code coverage report with phpunit:
$ phpdbg -qrr ./vendor/bin/phpunit --coverage-html tests/reports/coverage
Reports are generated in the tests/reports
directory.