Skip to content

Commit 5eea699

Browse files
committed
Adds test for PHP 8.4.
1 parent 18cc85c commit 5eea699

File tree

3 files changed

+31
-29
lines changed

3 files changed

+31
-29
lines changed

.github/workflows/main.yaml

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@ on:
66

77
jobs:
88
tests:
9-
runs-on: ubuntu-22.04
9+
runs-on: ubuntu-24.04-arm
1010
strategy:
1111
matrix:
12-
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
12+
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
1313
name: PHP ${{ matrix.php }}
1414
steps:
15-
- uses: actions/checkout@v3
16-
# required for "git tag" presence for MonorepoBuilder split and ChangelogLinker git tags resolver; default is 1
17-
- run: git fetch --depth=100000 origin
18-
# see https://github.com/shivammathur/setup-php
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 5
1918
- uses: shivammathur/setup-php@v2
2019
with:
2120
php-version: ${{ matrix.php }}
@@ -26,11 +25,11 @@ jobs:
2625

2726
tests_lowest_dependencies:
2827
name: Lowest dependencies
29-
runs-on: ubuntu-22.04
28+
runs-on: ubuntu-24.04-arm
3029
steps:
31-
- uses: actions/checkout@v3
32-
- run: git fetch --depth=100000 origin
33-
# see https://github.com/shivammathur/setup-php
30+
- uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 5
3433
- uses: shivammathur/setup-php@v2
3534
with:
3635
php-version: '7.1'
@@ -41,11 +40,11 @@ jobs:
4140

4241
test_coverage:
4342
name: Coverage
44-
runs-on: ubuntu-22.04
43+
runs-on: ubuntu-24.04-arm
4544
steps:
46-
- uses: actions/checkout@v3
47-
- run: git fetch --depth=100000 origin
48-
# see https://github.com/shivammathur/setup-php
45+
- uses: actions/checkout@v4
46+
with:
47+
fetch-depth: 5
4948
- uses: shivammathur/setup-php@v2
5049
with:
5150
php-version: '7.1'
@@ -59,26 +58,29 @@ jobs:
5958
6059
php-cs-fixer:
6160
name: PHP CS Fixer
62-
runs-on: ubuntu-22.04
61+
runs-on: ubuntu-24.04-arm
6362
steps:
64-
- uses: actions/checkout@v3
65-
# see https://github.com/shivammathur/setup-php
63+
- uses: actions/checkout@v4
64+
with:
65+
fetch-depth: 5
6666
- uses: shivammathur/setup-php@v2
6767
with:
68-
php-version: '8.2'
68+
php-version: '8.4'
6969
extensions: xml
7070
coverage: none
7171
- run: composer install --no-progress
7272
- run: composer php-cs-fixer-dry-run
7373

7474
phpstan:
7575
name: PHPStan
76-
runs-on: ubuntu-22.04
76+
runs-on: ubuntu-24.04-arm
7777
steps:
78-
- uses: actions/checkout@v3
78+
- uses: actions/checkout@v4
79+
with:
80+
fetch-depth: 5
7981
- uses: shivammathur/setup-php@v2
8082
with:
81-
php-version: '8.2'
83+
php-version: '8.4'
8284
coverage: none
8385
- run: composer install --no-progress
8486
- run: composer phpstan

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
},
2626
"require-dev": {
2727
"friendsofphp/php-cs-fixer": "^3.0",
28-
"phpstan/phpstan": "^1.0",
29-
"phpstan/phpstan-phpunit": "^1.0",
30-
"phpstan/phpstan-strict-rules": "^1.0",
31-
"phpstan/phpstan-webmozart-assert": "^1.0",
28+
"phpstan/phpstan": "^1.0 || ^2.0",
29+
"phpstan/phpstan-phpunit": "^1.0 || ^2.0",
30+
"phpstan/phpstan-strict-rules": "^1.0 || ^2.0",
31+
"phpstan/phpstan-webmozart-assert": "^1.0 || ^2.0",
3232
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
3333
},
3434
"config": {

tests/FeedTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function testFeedCreation1(): void
6767
}
6868

6969
$valid = Feed::validate($feed->getDocument(), $errors);
70-
self::assertTrue($valid, self::formatXmlErrors($errors));
70+
self::assertTrue($valid, self::formatXmlErrors($errors ?? []));
7171

7272
$xml = $feed->saveXML();
7373
assert(false !== $xml);
@@ -99,7 +99,7 @@ public function testFeedCreation2(): void
9999
}
100100

101101
$valid = Feed::validate($feed->getDocument(), $errors);
102-
self::assertTrue($valid, self::formatXmlErrors($errors));
102+
self::assertTrue($valid, self::formatXmlErrors($errors ?? []));
103103

104104
$xml = $feed->saveXML();
105105
assert(false !== $xml);
@@ -127,7 +127,7 @@ public function testFeedCreation3(): void
127127
}
128128

129129
$valid = Feed::validate($feed->getDocument(), $errors);
130-
self::assertTrue($valid, self::formatXmlErrors($errors));
130+
self::assertTrue($valid, self::formatXmlErrors($errors ?? []));
131131

132132
$xml = $feed->saveXML();
133133
assert(false !== $xml);
@@ -161,7 +161,7 @@ public function testFeedCreation4(): void
161161
}
162162

163163
$valid = Feed::validate($feed->getDocument(), $errors);
164-
self::assertTrue($valid, self::formatXmlErrors($errors));
164+
self::assertTrue($valid, self::formatXmlErrors($errors ?? []));
165165

166166
$xml = $feed->saveXML();
167167
assert(false !== $xml);

0 commit comments

Comments
 (0)