trilations / html-to-binary
There is no license information available for the latest version (3.0.1) of this package.
Export HTML to jpeg/png or PDF with Docker-based puppeteer server
3.0.1
2022-11-09 08:39 UTC
Requires
- php: ^7.4 || ^8.0
- ext-json: *
- psr/http-client: 1.0.1
- psr/http-factory: 1.0.1
Requires (Dev)
- phpcompatibility/php-compatibility: ^9.3
- phpro/grumphp-shim: ^1.13
- phpunit/phpunit: ^9
- squizlabs/php_codesniffer: ^3.7
README
Installation
Add it to your composer.json
:
{
"repositories": [
{
"type": "vcs",
"url": "https://gitlab.com/trilations/html-to-binary.git"
},
],
"require": {
"trilations/html-to-binary": "^2.4.0"
}
}
And run composer update:
composer update
Usage
Contributing
Installation
# make sure you have php 7.4 or higher
php -v
# make sure you have composer installed
composer -v
# clone the repository
git clone git@gitlab.com:trilations/html-to-binary.git
# cd into the directory
cd html-to-binary
# install dependencies
composer install
Coding Standards
Check and fix for violations against the coding standard
# run phpcs on the code (checks violations)
./vendor/bin/phpcs
# run phpcbf (fixes violations)
./vendor/bin/phpcbf
# add all warnings to the output
./vendor/bin/phpcs --warning-severity=1
Additionally, you should regularly check for any incompatibilies with our supported PHP versions:
# Runs the sniffer script as defined in composer.json
composer sniffer:php7.4
composer sniffer:php8.0
composer sniffer:php8.1
# Any other version can be checked like this
composer sniffer:php 7.1
Tests
PHPUnit
# running all tests
./vendor/bin/phpunit
# checking the code coverage (requires Xdebug)
./vendor/bin/phpunit --coverage-text
./vendor/bin/phpunit --coverage-html coverage.html # generate html report
# you might need to prefix these commands with XDEBUG_MODE=coverage
XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-text