Aggiornato Composer
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request: ~
|
||||
|
||||
jobs:
|
||||
check_composer:
|
||||
name: Check composer.json
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
coverage: none
|
||||
php-version: '8.0'
|
||||
- run: composer validate --strict --no-check-lock
|
||||
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php: [ '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1' ]
|
||||
composer_flags: [ '' ]
|
||||
include:
|
||||
- php: '5.5'
|
||||
composer_flags: '--prefer-lowest'
|
||||
- php: '7.0'
|
||||
composer_flags: '--prefer-lowest'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: "${{ matrix.php }}"
|
||||
- name: Install dependencies
|
||||
run: composer update --ansi --no-progress --prefer-dist --no-interaction ${{ matrix.composer_flags }}
|
||||
- name: Run tests
|
||||
run: vendor/bin/phpunit -v --colors=always --coverage-clover=coverage.clover
|
||||
- name: Upload code coverage
|
||||
continue-on-error: true
|
||||
run: wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"php": "^5.5 || ^7.0 || ^8.0",
|
||||
"ext-dom": "*",
|
||||
"ext-libxml": "*",
|
||||
"symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0"
|
||||
"symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5 || ^8.5.21 || ^9.5.10"
|
||||
|
||||
@@ -113,7 +113,7 @@ class CssToInlineStyles
|
||||
{
|
||||
$document = new \DOMDocument('1.0', 'UTF-8');
|
||||
$internalErrors = libxml_use_internal_errors(true);
|
||||
$document->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
|
||||
$document->loadHTML(mb_encode_numericentity($html, [0x80, 0x10FFFF, 0, 0x1FFFFF], 'UTF-8'));
|
||||
libxml_use_internal_errors($internalErrors);
|
||||
$document->formatOutput = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user