From 2b4a46fe9875fa1d404c73b8a509dbebdcaa8513 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 09:26:36 +0000 Subject: [PATCH 1/6] Update vimeo/psalm requirement from ^4.18 to ^5.14 Updates the requirements on [vimeo/psalm](https://github.com/vimeo/psalm) to permit the latest version. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/4.18...5.14.0) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9b8ffe3..1141a5b 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "phpunit/phpunit": "^9.5", "roave/infection-static-analysis-plugin": "^1.16", "spatie/phpunit-watcher": "^1.23", - "vimeo/psalm": "^4.18" + "vimeo/psalm": "^5.14" }, "autoload": { "psr-4": { From bb42a654d1a4ce7cdb170a3825393e2a4b1134bb Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Mon, 31 Jul 2023 13:57:28 +0300 Subject: [PATCH 2/6] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1141a5b..e5c89f4 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "phpunit/phpunit": "^9.5", "roave/infection-static-analysis-plugin": "^1.16", "spatie/phpunit-watcher": "^1.23", - "vimeo/psalm": "^5.14" + "vimeo/psalm": "^4.30|^5.14" }, "autoload": { "psr-4": { From c6ccda143343ae7aff37000b875194ff6372cec0 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Mon, 31 Jul 2023 15:47:31 +0300 Subject: [PATCH 3/6] improve psalm config --- psalm.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/psalm.xml b/psalm.xml index 2df6349..4ba0a00 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,14 +1,20 @@ + + + + From 5bca7164c29b56b37753b6be4ea7ae5d4a3f971d Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Mon, 31 Jul 2023 15:53:36 +0300 Subject: [PATCH 4/6] Fix 1 --- src/QueryDataReader.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/QueryDataReader.php b/src/QueryDataReader.php index 661451c..68db498 100644 --- a/src/QueryDataReader.php +++ b/src/QueryDataReader.php @@ -5,7 +5,12 @@ namespace Yiisoft\Data\Db; /** - * Base class for QueryDataReaderInterface + * Base class for `QueryDataReaderInterface` + * + * @template TKey as array-key + * @template TValue as array|object + * + * @extends AbstractQueryDataReader */ final class QueryDataReader extends AbstractQueryDataReader { From 1791ec31ca24f136cb2dc0ce7b36474abb9f21ad Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Mon, 31 Jul 2023 16:05:45 +0300 Subject: [PATCH 5/6] Fix 2 --- src/AbstractQueryDataReader.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/AbstractQueryDataReader.php b/src/AbstractQueryDataReader.php index 8d6b3b3..80f0295 100644 --- a/src/AbstractQueryDataReader.php +++ b/src/AbstractQueryDataReader.php @@ -191,6 +191,7 @@ protected function applyHaving(QueryInterface $query): QueryInterface /** * @psalm-mutation-free + * @psalm-return static */ public function withOffset(int $offset): static { @@ -203,6 +204,7 @@ public function withOffset(int $offset): static /** * @psalm-mutation-free + * @psalm-return static */ public function withLimit(int $limit): static { @@ -217,6 +219,10 @@ public function withLimit(int $limit): static return $new; } + /** + * @psalm-mutation-free + * @psalm-return static + */ public function withCountParam(?string $countParam): static { if ($this->countParam === $countParam) { @@ -232,6 +238,7 @@ public function withCountParam(?string $countParam): static /** * @psalm-mutation-free + * @psalm-return static */ public function withSort(?Sort $sort): static { @@ -244,6 +251,7 @@ public function withSort(?Sort $sort): static /** * @psalm-mutation-free + * @psalm-return static */ public function withFilter(FilterInterface $filter): static { @@ -254,6 +262,10 @@ public function withFilter(FilterInterface $filter): static return $new; } + /** + * @psalm-mutation-free + * @psalm-return static + */ public function withHaving(?FilterInterface $having): static { $new = clone $this; @@ -263,6 +275,10 @@ public function withHaving(?FilterInterface $having): static return $new; } + /** + * @psalm-mutation-free + * @psalm-return static + */ public function withBatchSize(?int $batchSize): static { if ($batchSize !== null && $batchSize < 1) { @@ -278,7 +294,9 @@ public function withBatchSize(?int $batchSize): static /** * @param FilterHandlerInterface ...$filterHandlers * @return $this - * @psalm-suppress ArgumentTypeCoercion + * + * @psalm-suppress ArgumentTypeCoercion * + * @psalm-return static */ public function withFilterHandlers(FilterHandlerInterface ...$filterHandlers): static { From 9606d4a195ef25add66183fb3d12fcb282e17042 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Mon, 31 Jul 2023 16:08:02 +0300 Subject: [PATCH 6/6] fix --- src/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/.gitkeep diff --git a/src/.gitkeep b/src/.gitkeep deleted file mode 100644 index e69de29..0000000