From f83b8bd90c2561dc04572100af1b9ea76fe46c4b Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 30 Dec 2022 17:05:05 +0100 Subject: [PATCH 1/2] Add support for PHP 8.1 and 8.2 --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9666e13..2641d0f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -34,7 +34,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: ['7.4', '8.0'] + php-version: ['7.4', '8.0', '8.1', '8.2'] steps: - name: 'Checkout code' From dcd1a746bd686a1dee811c66b0e6707da136b3b3 Mon Sep 17 00:00:00 2001 From: Wouter de Jong Date: Sun, 15 Jan 2023 14:06:54 +0100 Subject: [PATCH 2/2] Always install masterminds/html5 and enable HTML5 parsing --- composer.json | 3 ++- tests/IntegrationTest.php | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c973a6d..9416e83 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,8 @@ "require-dev": { "gajus/dindent": "^2.0", "symfony/phpunit-bridge": "^5.2 || ^6.0", - "symfony/process": "^5.2 || ^6.0" + "symfony/process": "^5.2 || ^6.0", + "masterminds/html5": "^2.7" }, "bin": ["bin/docs-builder"] } diff --git a/tests/IntegrationTest.php b/tests/IntegrationTest.php index 0dd7e2a..3be62d5 100644 --- a/tests/IntegrationTest.php +++ b/tests/IntegrationTest.php @@ -106,6 +106,9 @@ public function testParseUnitBlock(string $blockName) $actualHtml = $parser->parseFile($sourceFile)->renderDocument(); $expectedHtml = file_get_contents(sprintf('%s/fixtures/expected/blocks/%s.html', __DIR__, $blockName)); + if (false === stripos($expectedHtml, ''.$expectedHtml.''; + } $actualCrawler = new Crawler($actualHtml); $expectedCrawler = new Crawler($expectedHtml);