From d3c551dd9ce58279603667d368035538f29b5ecb Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Mon, 17 Mar 2025 10:23:27 +0300 Subject: [PATCH] Improve PHP 8.4 support --- CHANGELOG.md | 2 +- composer.json | 5 ++--- psalm.xml | 2 ++ tests/Paginator/KeysetPaginatorTest.php | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c79e1f69..7f2cc066 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,7 +50,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: Change PHP constraint in `composer.json` to `~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0` (@vjik) +- Chg #211, #221: Change PHP constraint in `composer.json` to `8.1 - 8.4` (@vjik) ## 1.0.1 January 25, 2023 diff --git a/composer.json b/composer.json index 0b716589..a7c194b1 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ } ], "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", + "php": "8.1 - 8.4", "ext-mbstring": "*", "yiisoft/arrays": "^3.0" }, @@ -41,7 +41,7 @@ "rector/rector": "^2.0.9", "roave/infection-static-analysis-plugin": "^1.35", "spatie/phpunit-watcher": "^1.24", - "vimeo/psalm": "^5.26.1 || ^6.6" + "vimeo/psalm": "^5.26.1 || ^6.9.1" }, "autoload": { "psr-4": { @@ -55,7 +55,6 @@ }, "config": { "sort-packages": true, - "bump-after-update": "dev", "allow-plugins": { "infection/extension-installer": true, "composer/package-versions-deprecated": true diff --git a/psalm.xml b/psalm.xml index b48c894e..39a3bda9 100644 --- a/psalm.xml +++ b/psalm.xml @@ -3,6 +3,8 @@ errorLevel="1" findUnusedBaselineEntry="true" findUnusedCode="false" + ensureOverrideAttribute="false" + strictBinaryOperands="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" diff --git a/tests/Paginator/KeysetPaginatorTest.php b/tests/Paginator/KeysetPaginatorTest.php index 088bed8c..f0b6781a 100644 --- a/tests/Paginator/KeysetPaginatorTest.php +++ b/tests/Paginator/KeysetPaginatorTest.php @@ -601,7 +601,7 @@ public function testCustomPageSize(): void $this->assertCount(2, $paginator->read()); } - private static function getDataSet(array $keys = null): array + private static function getDataSet(?array $keys = null): array { if ($keys === null) { return self::DEFAULT_DATASET; @@ -705,7 +705,7 @@ private function createObjectWithGetters(int $id, string $name): object return new class ($id, $name) { private int $createdAt; - public function __construct(private int $id, private string $name, int $createdAt = null) + public function __construct(private int $id, private string $name, ?int $createdAt = null) { $this->createdAt = $createdAt ?: time(); }