Skip to content

Commit 7e3e821

Browse files
authored
PHP 8.5 support (#785)
1 parent 17be484 commit 7e3e821

File tree

12 files changed

+41
-19
lines changed

12 files changed

+41
-19
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
os: >-
3232
['ubuntu-latest', 'windows-latest']
3333
php: >-
34-
['8.1', '8.2', '8.3', '8.4']
34+
['8.1', '8.2', '8.3', '8.4', '8.5']
3535
phpunit-without-intl:
3636
uses: yiisoft/actions/.github/workflows/phpunit.yml@master
3737
with:
@@ -41,4 +41,4 @@ jobs:
4141
os: >-
4242
['ubuntu-latest', 'windows-latest']
4343
php: >-
44-
['8.1', '8.2', '8.3', '8.4']
44+
['8.1', '8.2', '8.3', '8.4', '8.5']

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ jobs:
3131
os: >-
3232
['ubuntu-latest']
3333
php: >-
34-
['8.1', '8.2', '8.3', '8.4']
34+
['8.1', '8.2', '8.3', '8.4', '8.5']
3535
config: ./composer-require-checker.json

.github/workflows/mutation.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ name: mutation test
2222

2323
jobs:
2424
mutation:
25-
uses: yiisoft/actions/.github/workflows/roave-infection.yml@master
25+
uses: yiisoft/actions/.github/workflows/infection.yml@master
2626
with:
27-
min-covered-msi: 100
2827
os: >-
2928
['ubuntu-latest']
3029
php: >-
31-
['8.4']
30+
['8.5']
31+
infection-args: "--ignore-msi-with-no-mutations"
3232
secrets:
3333
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

.github/workflows/rector.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ jobs:
2121
os: >-
2222
['ubuntu-latest']
2323
php: >-
24-
['8.4']
24+
['8.5']

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Bug #776: Take `PropertyTranslatorProviderInterface` into account during context validation (@vjik)
66
- Bug #783: Fix error on uninitialized properties validation (@batyrmastyr)
7+
- Enh #784: Add PHP 8.5 support (@vjik)
78

89
## 2.5.0 July 19, 2025
910

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ This package provides data validation capabilities.
3636

3737
## Requirements
3838

39-
- PHP 8.1 or higher.
39+
- PHP 8.1 - 8.5.
4040
- `mbstring` PHP extension.
4141

4242
## Installation

composer.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
}
2828
],
2929
"require": {
30-
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
30+
"php": "8.1 - 8.5",
3131
"ext-mbstring": "*",
3232
"psr/container": "^1.0 || ^2.0",
3333
"psr/http-message": "^1.0 || ^2.0",
@@ -38,14 +38,13 @@
3838
"yiisoft/translator": "^2.1 || ^3.0"
3939
},
4040
"require-dev": {
41+
"bamarni/composer-bin-plugin": "^1.8.3",
4142
"jetbrains/phpstorm-attributes": "^1.2",
4243
"maglnet/composer-require-checker": "^4.7.1",
4344
"phpbench/phpbench": "^1.4.1",
4445
"phpunit/phpunit": "^10.5.46",
4546
"rector/rector": "^2.0.16",
46-
"roave/infection-static-analysis-plugin": "^1.35",
4747
"spatie/phpunit-watcher": "^1.24",
48-
"vimeo/psalm": "^5.26.1 || ^6.12",
4948
"yiisoft/di": "^1.3",
5049
"yiisoft/test-support": "^3.0.2",
5150
"yiisoft/translator-message-php": "^1.1.1",
@@ -67,6 +66,11 @@
6766
}
6867
},
6968
"extra": {
69+
"bamarni-bin": {
70+
"bin-links": true,
71+
"target-directory": "tools",
72+
"forward-command": true
73+
},
7074
"config-plugin-options": {
7175
"source-directory": "config"
7276
},
@@ -78,7 +82,7 @@
7882
"config": {
7983
"sort-packages": true,
8084
"allow-plugins": {
81-
"infection/extension-installer": true,
85+
"bamarni/composer-bin-plugin": true,
8286
"composer/package-versions-deprecated": true,
8387
"yiisoft/config": false
8488
}

tests/Rule/Image/ImageTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@ public static function dataValidationFailed(): array
139139
$notImageResult = ['' => ['Value must be an image.']];
140140

141141
return [
142-
'heic-with-width' => [__DIR__ . '/797x808.HEIC', new Image(width: 10), $notImageResult],
143-
'heic-with-height' => [__DIR__ . '/797x808.HEIC', new Image(height: 10), $notImageResult],
144-
'heic-with-min-width' => [__DIR__ . '/797x808.HEIC', new Image(minWidth: 10), $notImageResult],
145-
'heic-with-max-height' => [__DIR__ . '/797x808.HEIC', new Image(minHeight: 10), $notImageResult],
146-
'heic-with-max-width' => [__DIR__ . '/797x808.HEIC', new Image(maxWidth: 10), $notImageResult],
147-
'heic-with-min-height' => [__DIR__ . '/797x808.HEIC', new Image(maxHeight: 10), $notImageResult],
142+
'heic-with-width' => [__DIR__ . '/not-image.jpg', new Image(width: 10), $notImageResult],
143+
'heic-with-height' => [__DIR__ . '/not-image.jpg', new Image(height: 10), $notImageResult],
144+
'heic-with-min-width' => [__DIR__ . '/not-image.jpg', new Image(minWidth: 10), $notImageResult],
145+
'heic-with-max-height' => [__DIR__ . '/not-image.jpg', new Image(minHeight: 10), $notImageResult],
146+
'heic-with-max-width' => [__DIR__ . '/not-image.jpg', new Image(maxWidth: 10), $notImageResult],
147+
'heic-with-min-height' => [__DIR__ . '/not-image.jpg', new Image(maxHeight: 10), $notImageResult],
148148
'heic-with-size-and-custom-message' => [
149-
['a' => __DIR__ . '/797x808.HEIC'],
149+
['a' => __DIR__ . '/not-image.jpg'],
150150
['a' => new Image(minWidth: 10, notImageMessage: 'Value of "{property}" must be an image.')],
151151
['a' => ['Value of "a" must be an image.']],
152152
],

tests/Rule/Image/not-image.jpg

Loading

tools/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/*/vendor
2+
/*/composer.lock

0 commit comments

Comments
 (0)