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/bc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.0']
['8.1']
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- 'psalm.xml'

push:
branches: ['master']
paths-ignore:
- 'docs/**'
- 'README.md'
Expand All @@ -28,4 +29,4 @@ jobs:
os: >-
['ubuntu-latest', 'windows-latest']
php: >-
['8.0', '8.1']
['8.1', '8.2', '8.3']
3 changes: 2 additions & 1 deletion .github/workflows/composer-require-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- 'psalm.xml'

push:
branches: ['master']
paths-ignore:
- 'docs/**'
- 'README.md'
Expand All @@ -30,4 +31,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.0', '8.1']
['8.1', '8.2', '8.3']
1 change: 1 addition & 0 deletions .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'psalm.xml'

push:
branches: ['master']
paths-ignore:
- 'docs/**'
- 'README.md'
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ name: rector
jobs:
rector:
uses: yiisoft/actions/.github/workflows/rector.yml@master
secrets:
token: ${{ secrets.YIISOFT_GITHUB_TOKEN }}
with:
os: >-
['ubuntu-latest']
php: >-
['8.0']
['8.3']
11 changes: 2 additions & 9 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- 'phpunit.xml.dist'

push:
branches: ['master']
paths-ignore:
- 'docs/**'
- 'README.md'
Expand All @@ -28,12 +29,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.1']
psalm-php80:
uses: yiisoft/actions/.github/workflows/psalm.yml@master
with:
psalm-config: psalm-php80.xml
os: >-
['ubuntu-latest']
php: >-
['8.0']
['8.1', '8.2', '8.3']
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ phpunit.phar
# local phpunit config
/phpunit.xml
# phpunit cache
.phpunit.result.cache
/.phpunit.cache/*
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build:

environment:
php:
version: 8.0.18
version: 8.1.26
ini:
xdebug.mode: coverage

Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
- New #150: Extract `withLimit()` from `ReadableDataInterface` into `LimitableDataInterface` (@vjik)
- Enh #150: `PaginatorInterface` now extends `ReadableDataInterface` (@vjik)
- Chg #151: Rename `isRequired()` method in `PaginatorInterface` to `isPaginationRequired()` (@vjik)
- New #153: Add `KeysetPaginator::withFilterCallback()` method that allows set closure for preparing filter passed to
- New #153, #154: Add `KeysetPaginator::withFilterCallback()` method that allows set closure for preparing filter passed to
the data reader (@vjik)
- New #153: Add `Compare::withValue()` method (@vjik)
- Chg #154: Raise minimum required PHP version to 8.1 (@vjik)

## 1.0.1 January 25, 2023

Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@
}
],
"require": {
"php": "^8.0",
"php": "^8.1",
"yiisoft/arrays": "^3.0"
},
"require-dev": {
"maglnet/composer-require-checker": "^4.2",
"phpunit/phpunit": "^9.5",
"rector/rector": "^0.19.0",
"roave/infection-static-analysis-plugin": "^1.25",
"maglnet/composer-require-checker": "^4.7",
"phpunit/phpunit": "^10",
"rector/rector": "^0.19",
"roave/infection-static-analysis-plugin": "^1.34",
"spatie/phpunit-watcher": "^1.23",
"vimeo/psalm": "^4.26|^5.4"
"vimeo/psalm": "^5.20"
},
"autoload": {
"psr-4": {
Expand Down
31 changes: 15 additions & 16 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit
bootstrap="vendor/autoload.php"
colors="true"
verbose="true"
failOnRisky="true"
failOnWarning="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
stopOnFailure="false"
executionOrder="random"
resolveDependencies="true"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="vendor/autoload.php"
cacheDirectory=".phpunit.cache"
requireCoverageMetadata="false"
beStrictAboutCoverageMetadata="true"
beStrictAboutOutputDuringTests="true"
executionOrder="random"
failOnRisky="true"
failOnWarning="true"
stopOnFailure="false"
colors="true"
>
<php>
<ini name="error_reporting" value="-1"/>
Expand All @@ -23,9 +22,9 @@
</testsuite>
</testsuites>

<coverage>
<source>
<include>
<directory>./src</directory>
<directory suffix=".php">./src</directory>
</include>
</coverage>
</source>
</phpunit>
18 changes: 0 additions & 18 deletions psalm-php80.xml

This file was deleted.

6 changes: 5 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor"/>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<issueHandlers>
<MixedAssignment errorLevel="suppress" />
<RiskyTruthyFalsyComparison errorLevel="suppress" />
</issueHandlers>
</psalm>
11 changes: 10 additions & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\Config\RectorConfig;
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
use Rector\Set\ValueObject\LevelSetList;

return static function (RectorConfig $rectorConfig): void {
Expand All @@ -17,6 +20,12 @@

// define sets of rules
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_80,
LevelSetList::UP_TO_PHP_81,
]);

$rectorConfig->skip([
ClosureToArrowFunctionRector::class,
JsonThrowOnErrorRector::class,
ReadOnlyPropertyRector::class,
]);
};
8 changes: 4 additions & 4 deletions src/Paginator/KeysetFilterContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
final class KeysetFilterContext
{
public function __construct(
public string $field,
public string $value,
public int $sorting,
public bool $isReverse
public readonly string $field,
public readonly string $value,
public readonly int $sorting,
public readonly bool $isReverse
) {
}
}
Loading