Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
os: >-
['ubuntu-latest', 'windows-latest']
php: >-
['8.1', '8.2', '8.3', '8.4']
['8.1', '8.2', '8.3', '8.4', '8.5']
2 changes: 1 addition & 1 deletion .github/workflows/composer-require-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.1', '8.2', '8.3', '8.4']
['8.1', '8.2', '8.3', '8.4', '8.5']
4 changes: 2 additions & 2 deletions .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@

jobs:
mutation:
uses: yiisoft/actions/.github/workflows/roave-infection.yml@master
uses: yiisoft/actions/.github/workflows/infection.yml@master
with:
os: >-
['ubuntu-latest']
php: >-
['8.1']
['8.5']
min-covered-msi: 100
secrets:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
2 changes: 1 addition & 1 deletion .github/workflows/rector-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
token: ${{ secrets.YIISOFT_GITHUB_TOKEN }}
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
php: '8.4'
php: '8.1'
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
method when non-positive value is passed (@vjik)
- Chg #219: Don't check correctness of current page in `PaginatorInterface::isOnLastPage()` method (@vjik)
- Chg #219: Rename `PaginatorException` to `InvalidPageException` (@vjik)
- Chg #211, #221: Change PHP constraint in `composer.json` to `8.1 - 8.4` (@vjik)
- Chg #211, #221, #240: Change PHP constraint in `composer.json` to `8.1 - 8.5` (@vjik)
- New #223: Add `Sort::getDefaultOrder()` method (@vjik)
- Enh #223: `KeysetPaginator` now uses default order from `Sort` when no sort is set (@vjik)
- Chg #224: Change `$iterableFilterHandlers` to context object in `IterableFilterHandlerInterface::match()` (@vjik)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Features are:

## Requirements

- PHP 8.1 or higher.
- PHP 8.1 - 8.5.

## Installation

Expand Down
19 changes: 13 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,17 @@
}
],
"require": {
"php": "8.1 - 8.4",
"php": "8.1 - 8.5",
"ext-mbstring": "*",
"yiisoft/arrays": "^3.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.3",
"friendsofphp/php-cs-fixer": "^3.89.2",
"maglnet/composer-require-checker": "^4.7.1",
"phpunit/phpunit": "^10.5.52",
"rector/rector": "^2.2.8",
"roave/infection-static-analysis-plugin": "^1.35",
"spatie/phpunit-watcher": "^1.24",
"vimeo/psalm": "^5.26.1 || ^6.10.3"
"spatie/phpunit-watcher": "^1.24"
},
"autoload": {
"psr-4": {
Expand All @@ -54,16 +53,24 @@
"Yiisoft\\Data\\Tests\\": "tests"
}
},
"extra": {
"bamarni-bin": {
"bin-links": true,
"target-directory": "tools",
"forward-command": true
}
},
"config": {
"sort-packages": true,
"allow-plugins": {
"infection/extension-installer": true,
"bamarni/composer-bin-plugin": true,
"composer/package-versions-deprecated": true
}
},
"scripts": {
"test": "phpunit --testdox --no-interaction",
"test-watch": "phpunit-watcher watch",
"cs-fix": "php-cs-fixer fix"
"cs-fix": "php-cs-fixer fix",
"mutation": "infection --threads=max --min-covered-msi=100"
}
}
2 changes: 2 additions & 0 deletions src/Paginator/KeysetPaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ public function withFilter(FilterInterface $filter): static
public function isOnFirstPage(): bool
{
if ($this->token === null) {
/** @infection-ignore-all */
return true;
}

Expand All @@ -323,6 +324,7 @@ public function isPaginationRequired(): bool
private function initialize(): void
{
if ($this->readCache !== null) {
/** @infection-ignore-all */
return;
}

Expand Down
1 change: 1 addition & 0 deletions tests/Paginator/OffsetPaginatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ public static function dataIsSupportSorting(): array
{
return [
'IterableDataReader' => [true, new IterableDataReader([])],
'IterableDataReaderWithLimit' => [false, (new IterableDataReader([]))->withLimit(10)],
'StubOffsetData' => [false, new StubOffsetData()],
'StubOffsetDataWithLimit' => [false, (new StubOffsetData())->withLimit(10)],
];
Expand Down
2 changes: 2 additions & 0 deletions tools/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/*/vendor
/*/composer.lock
10 changes: 10 additions & 0 deletions tools/infection/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"require-dev": {
"infection/infection": "^0.26 || ^0.31.9"
},
"config": {
"allow-plugins": {
"infection/extension-installer": true
}
}
}
5 changes: 5 additions & 0 deletions tools/psalm/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require-dev": {
"vimeo/psalm": "^5.26.1 || ^6.10.3"
}
}
Loading