Skip to content

Commit 8799d7b

Browse files
authored
Merge pull request #90 from veewee/php-85-upgrade-3.x
Upgrade to PHP 8.5 and latest dependencies
2 parents 4ec6f1d + 31f79f0 commit 8799d7b

File tree

71 files changed

+293
-112443
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+293
-112443
lines changed

.github/workflows/analyzers.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
operating-system: [ubuntu-latest]
15-
php-versions: ['8.2', '8.3', '8.4']
15+
php-versions: ['8.3', '8.4', '8.5']
1616
composer-options: ['--ignore-platform-req=php+']
1717
fail-fast: false
1818
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
@@ -29,3 +29,4 @@ jobs:
2929
run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.composer-options }}
3030
- name: Run the tests
3131
run: composer run psalm
32+
continue-on-error: ${{ matrix.php-versions == '8.5' }}

.github/workflows/autoloader.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
operating-system: [ubuntu-latest]
10-
php-versions: ['8.2', '8.3', '8.4']
10+
php-versions: ['8.3', '8.4', '8.5']
1111
composer-options: ['--ignore-platform-req=php+']
1212
fail-fast: false
1313
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}

.github/workflows/code-style.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
operating-system: [ubuntu-latest]
14-
php-versions: ['8.2', '8.3', '8.4']
14+
php-versions: ['8.3', '8.4', '8.5']
1515
composer-options: ['--ignore-platform-req=php+']
1616
fail-fast: false
1717
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}

.github/workflows/stress.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
operating-system: [ubuntu-latest]
10-
php-versions: ['8.2', '8.3', '8.4']
10+
php-versions: ['8.3', '8.4', '8.5']
1111
composer-options: ['--ignore-platform-req=php+']
1212
fail-fast: false
1313
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}

.github/workflows/tests.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
operating-system: [ubuntu-latest]
15-
php-versions: ['8.2', '8.3', '8.4']
15+
php-versions: ['8.3', '8.4', '8.5']
1616
composer-options: ['--ignore-platform-req=php+']
1717
fail-fast: false
1818
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
@@ -32,4 +32,3 @@ jobs:
3232
run: composer run tests
3333
- name: Check tests quality
3434
run: composer run testquality
35-
continue-on-error: ${{ matrix.php-versions == '8.4' }} # Infection is not ready yet.

.phive/phars.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

composer.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,23 @@
77
],
88
"type": "library",
99
"require": {
10-
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
10+
"php": "~8.3.0 || ~8.4.0 || ~8.5.0",
1111
"ext-dom": "*",
1212
"ext-libxml": "*",
1313
"ext-xml": "*",
1414
"ext-xsl": "*",
1515
"ext-xmlreader": "*",
1616
"ext-xmlwriter": "*",
17-
"azjezz/psl": "^3.0",
17+
"azjezz/psl": "^3.0 || ^4.0",
1818
"webmozart/assert": "^1.10"
1919
},
2020
"require-dev": {
2121
"symfony/finder": "^6.1 || ^7.0",
2222
"veewee/composer-run-parallel": "^1.0.0",
23-
"vimeo/psalm": "^5.4",
23+
"phpunit/phpunit": "~12.3",
24+
"vimeo/psalm": "~6.13",
25+
"php-cs-fixer/shim": "~3.88",
26+
"infection/infection": "^0.31.7",
2427
"php-standard-library/psalm-plugin": "^2.2"
2528
},
2629
"license": "MIT",
@@ -47,19 +50,19 @@
4750
"autoload": [
4851
"@php build/bootstrap.php"
4952
],
50-
"cs": "PHP_CS_FIXER_IGNORE_ENV=1 php ./tools/php-cs-fixer.phar fix --dry-run",
51-
"cs:fix": "PHP_CS_FIXER_IGNORE_ENV=1 php ./tools/php-cs-fixer.phar fix",
53+
"cs": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --dry-run",
54+
"cs:fix": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix",
5255
"psalm": "./vendor/bin/psalm --no-cache --stats",
53-
"tests": "./tools/phpunit.phar --coverage-text --color",
56+
"tests": "./vendor/bin/phpunit --coverage-text --color",
5457
"stress": [
5558
"Composer\\Config::disableProcessTimeout",
56-
"@php -c stress.ini ./tools/phpunit.phar --configuration phpunit.stress.xml --no-coverage"
59+
"@php -c stress.ini ./vendor/bin/phpunit --configuration phpunit.stress.xml --no-coverage"
5760
],
5861
"testquality": "@parallel coverage infection",
5962
"coverage": "@php ./tools/full-coverage-check.php .phpunit.cache/clover/clover.xml",
6063
"infection": [
6164
"Composer\\Config::disableProcessTimeout",
62-
"./tools/infection.phar --show-mutations -v"
65+
"./vendor/bin/infection --show-mutations -v"
6366
],
6467
"ci": [
6568
"@autoload",
@@ -69,7 +72,8 @@
6972
},
7073
"config": {
7174
"allow-plugins": {
72-
"veewee/composer-run-parallel": true
75+
"veewee/composer-run-parallel": true,
76+
"infection/extension-installer": true
7377
}
7478
}
7579
}

infection.json.dist

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@
66
},
77
"minMsi": 100,
88
"minCoveredMsi": 100,
9-
"phpUnit": {
10-
"customPath": ".\/tools\/phpunit.phar"
11-
},
129
"logs": {
1310
"text": ".phpunit.cache/infection.log",
1411
"html": ".phpunit.cache/infection"
1512
},
1613
"mutators": {
1714
"@default": true,
15+
"ReturnRemoval": {
16+
"ignore": [
17+
"VeeWee\\Xml\\Dom\\Traverser\\Visitor\\RemoveNamespaces::onNodeLeave",
18+
"VeeWee\\Xml\\Dom\\Traverser\\Visitor\\SortAttributes::onNodeEnter",
19+
"VeeWee\\Xml\\Reader\\Reader::provide",
20+
]
21+
},
1822
"CastInt": {
1923
"ignore": [
2024
"VeeWee\\Xml\\*Exception::__construct"

phpunit.xml

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,34 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
5-
bootstrap="tests/bootstrap.php"
6-
executionOrder="random"
7-
forceCoversAnnotation="false"
8-
beStrictAboutCoversAnnotation="false"
9-
beStrictAboutOutputDuringTests="true"
10-
beStrictAboutTodoAnnotatedTests="true"
11-
verbose="true"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
5+
bootstrap="tests/bootstrap.php"
6+
executionOrder="random"
7+
beStrictAboutCoverageMetadata="false"
8+
beStrictAboutOutputDuringTests="true"
9+
displayDetailsOnTestsThatTriggerWarnings="true"
10+
failOnWarning="true"
11+
failOnPhpunitWarning="true"
1212
>
13-
<coverage cacheDirectory=".phpunit.cache/code-coverage"
14-
processUncoveredFiles="true">
15-
<include>
16-
<directory suffix=".php">src</directory>
17-
</include>
18-
<exclude>
19-
<file>src/bootstrap.php</file>
20-
</exclude>
21-
<report>
22-
<clover outputFile=".phpunit.cache/clover/clover.xml" />
23-
<html outputDirectory=".phpunit.cache/report" lowUpperBound="99" highLowerBound="99" />
24-
</report>
25-
</coverage>
26-
<testsuites>
27-
<testsuite name="default">
28-
<directory suffix="Test.php">tests/Xml</directory>
29-
</testsuite>
30-
</testsuites>
13+
<source>
14+
<include>
15+
<directory suffix=".php">src</directory>
16+
</include>
17+
<exclude>
18+
<file>src/bootstrap.php</file>
19+
</exclude>
20+
</source>
21+
22+
<coverage includeUncoveredFiles="true">
23+
<report>
24+
<clover outputFile=".phpunit.cache/clover/clover.xml"/>
25+
<html outputDirectory=".phpunit.cache/report" lowUpperBound="99" highLowerBound="99"/>
26+
</report>
27+
</coverage>
28+
29+
<testsuites>
30+
<testsuite name="default">
31+
<directory suffix="Test.php">tests/Xml</directory>
32+
</testsuite>
33+
</testsuites>
3134
</phpunit>

psalm.xml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,21 @@
99
skipChecksOnUnresolvableIncludes="false"
1010
checkForThrowsDocblock="true"
1111
checkForThrowsInGlobalScope="true"
12+
findUnusedCode="false"
13+
ensureOverrideAttribute="false"
1214
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1315
xmlns="https://getpsalm.org/schema/config"
1416
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
1517
>
1618
<projectFiles>
1719
<directory name="src" />
18-
<directory name="tests" />
1920
<ignoreFiles>
21+
<directory name="tests" />
2022
<directory name="vendor" />
2123
<file name="src/bootstrap.php"/>
2224
</ignoreFiles>
2325
</projectFiles>
2426
<issueHandlers>
25-
<MissingConstructor>
26-
<errorLevel type="suppress">
27-
<directory name="tests"/>
28-
</errorLevel>
29-
</MissingConstructor>
30-
<UndefinedClass>
31-
<errorLevel type="suppress">
32-
<directory name="tests"/>
33-
</errorLevel>
34-
</UndefinedClass>
35-
<MissingDependency>
36-
<errorLevel type="suppress">
37-
<directory name="tests"/>
38-
</errorLevel>
39-
</MissingDependency>
4027
<MixedArgumentTypeCoercion>
4128
<errorLevel type="suppress">
4229
<directory name="src/Xml/Encoding/Internal/Encoder/Builder" />
@@ -47,6 +34,7 @@
4734
<file name="stubs/DOM.phpstub" />
4835
<file name="stubs/XMLReader.phpstub" />
4936
<file name="stubs/XMLWriter.phpstub" />
37+
<file name="stubs/XSLTProcessor.phpstub" />
5038
</stubs>
5139
<plugins>
5240
<pluginClass class="Psl\Psalm\Plugin" />

0 commit comments

Comments
 (0)