Skip to content

Commit 41569fd

Browse files
authored
Update the test matrix to cover PHP 8.1 to PHP 8.4 (#15)
1 parent e940d2e commit 41569fd

14 files changed

+38
-20
lines changed

.github/workflows/fix-cs-php.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
name: Coding Standards
88

99
jobs:
10-
open-pr-for-cs-violations:
10+
fix-cs-issues:
1111
name: PHP-CS-Fixer
1212
runs-on: ubuntu-22.04
1313
if: github.actor != 'dependabot[bot]'
@@ -18,7 +18,7 @@ jobs:
1818
ref: ${{ github.head_ref }}
1919

2020
- name: Run PHP-CS-Fixer
21-
uses: docker://ghcr.io/php-cs-fixer/php-cs-fixer:3.62.0-php8.3
21+
uses: docker://ghcr.io/php-cs-fixer/php-cs-fixer:3.89.2-php8.4
2222
with:
2323
args: "fix --show-progress=dots"
2424

.github/workflows/tests.yml

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,33 @@ on:
66
- master
77
pull_request:
88

9+
env:
10+
SYMFONY_DEPRECATIONS_HELPER: weak
11+
912
jobs:
10-
build:
11-
runs-on: ubuntu-latest
13+
PHPUnit:
14+
runs-on: ubuntu-22.04
1215
strategy:
1316
fail-fast: false
1417
matrix:
15-
php-version: [ '7.2', '7.4', '8.1', '8.2' ]
16-
coverage: none
17-
dependency-version: [ prefer-stable ]
18-
19-
name: PHP ${{ matrix.php-version }} - ${{ matrix.dependency-version }}
20-
18+
include:
19+
- { php-version: 8.1, dependency-version: prefer-lowest }
20+
- { php-version: 8.3, dependency-version: prefer-stable }
21+
- { php-version: 8.4, dependency-version: prefer-stable }
22+
name: PHPUnit (PHP ${{matrix.php-version}}, ${{ matrix.dependency-version }})
2123
steps:
2224
- uses: actions/checkout@v4
23-
- name: Install PHP
24-
uses: shivammathur/setup-php@v2
25+
- uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php-version }}
28+
coverage: none
29+
tools: composer:v2
30+
- uses: actions/cache@v4
2531
with:
26-
php-version: ${{ matrix.php-version }}
27-
coverage: none
28-
extensions: dom
29-
- name: Install dependencies
30-
run: composer update --no-interaction --prefer-dist --${{ matrix.dependency-version}} --no-progress --no-suggest
31-
- name: Run test suite
32-
run: vendor/bin/phpunit
32+
path: vendor
33+
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.dependency-version }}-${{ hashFiles('composer.json') }}
34+
restore-keys: |
35+
composer-${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.dependency-version }}-
36+
- run: composer update --${{ matrix.dependency-version }} --no-interaction --no-scripts --no-progress --ansi
37+
- run: composer show
38+
- run: vendor/bin/phpunit --display-warnings --display-deprecations

src/Webfactory/Dom/BaseParsingHelper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* (c) webfactory GmbH <info@webfactory.de>
45
*

src/Webfactory/Dom/Exception/EmptyXMLStringException.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* (c) webfactory GmbH <info@webfactory.de>
45
*

src/Webfactory/Dom/Exception/ParsingException.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* (c) webfactory GmbH <info@webfactory.de>
45
*

src/Webfactory/Dom/Exception/ParsingHelperException.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* (c) webfactory GmbH <info@webfactory.de>
45
*

src/Webfactory/Dom/HTMLParsingHelper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* (c) webfactory GmbH <info@webfactory.de>
45
*

src/Webfactory/Dom/PolyglotHTML5ParsingHelper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* (c) webfactory GmbH <info@webfactory.de>
45
*

src/Webfactory/Dom/XHTML10ParsingHelper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* (c) webfactory GmbH <info@webfactory.de>
45
*

tests/Webfactory/Dom/Test/BaseParsingHelperTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/*
34
* (c) webfactory GmbH <info@webfactory.de>
45
*

0 commit comments

Comments
 (0)