Skip to content

Commit 64cec48

Browse files
authored
Bump PHP version to ^8.1 and refactor code (#269)
1 parent 1773b7a commit 64cec48

33 files changed

Lines changed: 99 additions & 150 deletions

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
/infection.json.dist export-ignore
3232
/phpunit.xml.dist export-ignore
3333
/psalm.xml export-ignore
34+
/psalm83.xml export-ignore
3435
/tests export-ignore
3536
/docs export-ignore
3637

.github/workflows/bc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ jobs:
3030
os: >-
3131
['ubuntu-latest']
3232
php: >-
33-
['8.0']
33+
['8.3']

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ jobs:
3131
os: >-
3232
['ubuntu-latest', 'windows-latest']
3333
php: >-
34-
['8.0', '8.1', '8.2', '8.3']
34+
['8.1', '8.2', '8.3']

.github/workflows/composer-require-checker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ jobs:
3131
os: >-
3232
['ubuntu-latest']
3333
php: >-
34-
['8.0', '8.1', '8.2', '8.3']
34+
['8.1', '8.2', '8.3']

.github/workflows/static.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,6 @@ jobs:
3030
['ubuntu-latest']
3131
php: >-
3232
['8.1', '8.2']
33-
psalm80:
34-
uses: yiisoft/actions/.github/workflows/psalm.yml@master
35-
with:
36-
psalm-config: psalm80.xml
37-
os: >-
38-
['ubuntu-latest']
39-
php: >-
40-
['8.0']
4133
psalm83:
4234
uses: yiisoft/actions/.github/workflows/psalm.yml@master
4335
with:

.gitignore

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,10 @@ composer.phar
2929
# Mac DS_Store Files
3030
.DS_Store
3131

32-
# phpunit itself is not needed
33-
phpunit.phar
34-
# local phpunit config
32+
# PhpUnit
33+
/phpunit.phar
3534
/phpunit.xml
36-
# phpunit cache
37-
.phpunit.result.cache
35+
/.phpunit.cache
3836

3937
# ignore dev installed apps and extensions
4038
/apps

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## 10.0.1 under development
44

5-
- no changes in this release.
5+
- Enh #269: Bump PHP version to `^8.1` and refactor code (@vjik)
66

77
## 10.0.0 June 28, 2024
88

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
}
2828
],
2929
"require": {
30-
"php": "^8.0",
30+
"php": "^8.1",
3131
"psr/event-dispatcher": "1.0.0",
3232
"psr/event-dispatcher-implementation": "1.0.0",
3333
"yiisoft/arrays": "^2.0|^3.0",
@@ -38,15 +38,15 @@
3838
},
3939
"require-dev": {
4040
"maglnet/composer-require-checker": "^4.2",
41-
"phpunit/phpunit": "^9.5",
41+
"phpunit/phpunit": "^10.5",
4242
"rector/rector": "^1.2",
4343
"roave/infection-static-analysis-plugin": "^1.25",
4444
"spatie/phpunit-watcher": "^1.23",
45-
"vimeo/psalm": "^4.30|^5.20",
45+
"vimeo/psalm": "^5.26",
4646
"yiisoft/aliases": "^3.0",
4747
"yiisoft/di": "^1.2",
4848
"yiisoft/psr-dummy-provider": "^1.0",
49-
"yiisoft/test-support": "^1.4|^3.0"
49+
"yiisoft/test-support": "^3.0"
5050
},
5151
"extra": {
5252
"config-plugin-options": {

phpunit.xml.dist

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit
3-
bootstrap="vendor/autoload.php"
4-
colors="true"
5-
verbose="true"
6-
failOnRisky="true"
7-
failOnWarning="true"
8-
convertErrorsToExceptions="true"
9-
convertNoticesToExceptions="true"
10-
convertWarningsToExceptions="true"
11-
stopOnFailure="false"
12-
executionOrder="random"
13-
resolveDependencies="true"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
cacheDirectory=".phpunit.cache"
6+
requireCoverageMetadata="false"
7+
beStrictAboutCoverageMetadata="true"
8+
beStrictAboutOutputDuringTests="true"
9+
executionOrder="random"
10+
failOnRisky="true"
11+
failOnWarning="true"
12+
stopOnFailure="false"
13+
colors="true"
14+
displayDetailsOnPhpunitDeprecations="true"
1415
>
1516
<php>
16-
<ini name="error_reporting" value="-1" />
17+
<ini name="error_reporting" value="-1"/>
1718
</php>
1819

1920
<testsuites>
@@ -22,9 +23,9 @@
2223
</testsuite>
2324
</testsuites>
2425

25-
<coverage>
26+
<source>
2627
<include>
27-
<directory>./src</directory>
28+
<directory suffix=".php">./src</directory>
2829
</include>
29-
</coverage>
30+
</source>
3031
</phpunit>

psalm80.xml

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

0 commit comments

Comments
 (0)