Skip to content

Commit 43e46bf

Browse files
authored
PHP 8.5 support + More tests (#240)
1 parent aa29e7e commit 43e46bf

File tree

12 files changed

+40
-13
lines changed

12 files changed

+40
-13
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ jobs:
2929
os: >-
3030
['ubuntu-latest', 'windows-latest']
3131
php: >-
32-
['8.1', '8.2', '8.3', '8.4']
32+
['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,4 +31,4 @@ 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']

.github/workflows/mutation.yml

Lines changed: 2 additions & 2 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:
2727
os: >-
2828
['ubuntu-latest']
2929
php: >-
30-
['8.1']
30+
['8.5']
3131
min-covered-msi: 100
3232
secrets:
3333
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

.github/workflows/rector-cs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
token: ${{ secrets.YIISOFT_GITHUB_TOKEN }}
2525
with:
2626
repository: ${{ github.event.pull_request.head.repo.full_name }}
27-
php: '8.4'
27+
php: '8.1'

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
method when non-positive value is passed (@vjik)
5252
- Chg #219: Don't check correctness of current page in `PaginatorInterface::isOnLastPage()` method (@vjik)
5353
- Chg #219: Rename `PaginatorException` to `InvalidPageException` (@vjik)
54-
- Chg #211, #221: Change PHP constraint in `composer.json` to `8.1 - 8.4` (@vjik)
54+
- Chg #211, #221, #240: Change PHP constraint in `composer.json` to `8.1 - 8.5` (@vjik)
5555
- New #223: Add `Sort::getDefaultOrder()` method (@vjik)
5656
- Enh #223: `KeysetPaginator` now uses default order from `Sort` when no sort is set (@vjik)
5757
- Chg #224: Change `$iterableFilterHandlers` to context object in `IterableFilterHandlerInterface::match()` (@vjik)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Features are:
2727

2828
## Requirements
2929

30-
- PHP 8.1 or higher.
30+
- PHP 8.1 - 8.5.
3131

3232
## Installation
3333

composer.json

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,17 @@
3131
}
3232
],
3333
"require": {
34-
"php": "8.1 - 8.4",
34+
"php": "8.1 - 8.5",
3535
"ext-mbstring": "*",
3636
"yiisoft/arrays": "^3.0"
3737
},
3838
"require-dev": {
39+
"bamarni/composer-bin-plugin": "^1.8.3",
3940
"friendsofphp/php-cs-fixer": "^3.89.2",
4041
"maglnet/composer-require-checker": "^4.7.1",
4142
"phpunit/phpunit": "^10.5.52",
4243
"rector/rector": "^2.2.8",
43-
"roave/infection-static-analysis-plugin": "^1.35",
44-
"spatie/phpunit-watcher": "^1.24",
45-
"vimeo/psalm": "^5.26.1 || ^6.10.3"
44+
"spatie/phpunit-watcher": "^1.24"
4645
},
4746
"autoload": {
4847
"psr-4": {
@@ -54,16 +53,24 @@
5453
"Yiisoft\\Data\\Tests\\": "tests"
5554
}
5655
},
56+
"extra": {
57+
"bamarni-bin": {
58+
"bin-links": true,
59+
"target-directory": "tools",
60+
"forward-command": true
61+
}
62+
},
5763
"config": {
5864
"sort-packages": true,
5965
"allow-plugins": {
60-
"infection/extension-installer": true,
66+
"bamarni/composer-bin-plugin": true,
6167
"composer/package-versions-deprecated": true
6268
}
6369
},
6470
"scripts": {
6571
"test": "phpunit --testdox --no-interaction",
6672
"test-watch": "phpunit-watcher watch",
67-
"cs-fix": "php-cs-fixer fix"
73+
"cs-fix": "php-cs-fixer fix",
74+
"mutation": "infection --threads=max --min-covered-msi=100"
6875
}
6976
}

src/Paginator/KeysetPaginator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ public function withFilter(FilterInterface $filter): static
299299
public function isOnFirstPage(): bool
300300
{
301301
if ($this->token === null) {
302+
/** @infection-ignore-all */
302303
return true;
303304
}
304305

@@ -323,6 +324,7 @@ public function isPaginationRequired(): bool
323324
private function initialize(): void
324325
{
325326
if ($this->readCache !== null) {
327+
/** @infection-ignore-all */
326328
return;
327329
}
328330

tests/Paginator/OffsetPaginatorTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ public static function dataIsSupportSorting(): array
517517
{
518518
return [
519519
'IterableDataReader' => [true, new IterableDataReader([])],
520+
'IterableDataReaderWithLimit' => [false, (new IterableDataReader([]))->withLimit(10)],
520521
'StubOffsetData' => [false, new StubOffsetData()],
521522
'StubOffsetDataWithLimit' => [false, (new StubOffsetData())->withLimit(10)],
522523
];

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)