From b62b860bea559a0353273def2260ca45ce138173 Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Thu, 6 Jul 2023 08:26:50 +0200 Subject: [PATCH] Update to Promise v3 --- .github/workflows/release-managment.yaml | 5 +- composer.json | 8 +- composer.lock | 429 +++++++++++------------ src/Redis.php | 46 ++- tests/ClientStub.php | 30 +- tests/RedisTest.php | 16 +- 6 files changed, 287 insertions(+), 247 deletions(-) diff --git a/.github/workflows/release-managment.yaml b/.github/workflows/release-managment.yaml index c49b362..215f31d 100644 --- a/.github/workflows/release-managment.yaml +++ b/.github/workflows/release-managment.yaml @@ -7,6 +7,9 @@ on: - unlabeled - synchronize - reopened + - milestoned + - demilestoned + - ready_for_review milestone: types: - closed @@ -16,7 +19,7 @@ permissions: pull-requests: write jobs: release-managment: - name: Create Release + name: Release Management uses: WyriHaximus/github-workflows/.github/workflows/package-release-managment.yaml@main with: milestone: ${{ github.event.milestone.title }} diff --git a/composer.json b/composer.json index c96b385..8ed82e8 100644 --- a/composer.json +++ b/composer.json @@ -10,11 +10,11 @@ ], "require": { "php": "^8.2", - "clue/redis-react": "^2.6", + "clue/redis-react": "^2.7", "evenement/evenement": "^3.0.2", - "react/cache": "^1.1.1", - "react/promise": "^2.8 || ^3", - "thecodingmachine/safe": "^1.3 || ^2" + "react/cache": "^1.2", + "react/promise": "^3.1", + "thecodingmachine/safe": "^2" }, "require-dev": { "wyrihaximus/async-test-utilities": "^7.2" diff --git a/composer.lock b/composer.lock index eb65838..26ed5b8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "356ad3a90e24426e4acc6505687a258d", + "content-hash": "16c3e1c1a5362f3496ef42fe222f3978", "packages": [ { "name": "clue/redis-protocol", @@ -56,16 +56,16 @@ }, { "name": "clue/redis-react", - "version": "v2.6.0", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/clue/reactphp-redis.git", - "reference": "f911455f9d7a77dd6f39c22548ddff521544b291" + "reference": "2283690f249e8d93342dd63b5285732d2654e077" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/reactphp-redis/zipball/f911455f9d7a77dd6f39c22548ddff521544b291", - "reference": "f911455f9d7a77dd6f39c22548ddff521544b291", + "url": "https://api.github.com/repos/clue/reactphp-redis/zipball/2283690f249e8d93342dd63b5285732d2654e077", + "reference": "2283690f249e8d93342dd63b5285732d2654e077", "shasum": "" }, "require": { @@ -73,13 +73,13 @@ "evenement/evenement": "^3.0 || ^2.0 || ^1.0", "php": ">=5.3", "react/event-loop": "^1.2", - "react/promise": "^2.0 || ^1.1", - "react/promise-timer": "^1.8", - "react/socket": "^1.9" + "react/promise": "^3 || ^2.0 || ^1.1", + "react/promise-timer": "^1.9", + "react/socket": "^1.12" }, "require-dev": { - "clue/block-react": "^1.1", - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" + "clue/block-react": "^1.5", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" }, "type": "library", "autoload": { @@ -108,7 +108,7 @@ ], "support": { "issues": "https://github.com/clue/reactphp-redis/issues", - "source": "https://github.com/clue/reactphp-redis/tree/v2.6.0" + "source": "https://github.com/clue/reactphp-redis/tree/v2.7.0" }, "funding": [ { @@ -120,7 +120,7 @@ "type": "github" } ], - "time": "2022-05-09T09:50:02+00:00" + "time": "2024-01-05T15:54:20+00:00" }, { "name": "evenement/evenement", @@ -391,23 +391,24 @@ }, { "name": "react/promise", - "version": "v2.11.0", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "1a8460931ea36dc5c76838fec5734d55c88c6831" + "reference": "e563d55d1641de1dea9f5e84f3cccc66d2bfe02c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/1a8460931ea36dc5c76838fec5734d55c88c6831", - "reference": "1a8460931ea36dc5c76838fec5734d55c88c6831", + "url": "https://api.github.com/repos/reactphp/promise/zipball/e563d55d1641de1dea9f5e84f3cccc66d2bfe02c", + "reference": "e563d55d1641de1dea9f5e84f3cccc66d2bfe02c", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": ">=7.1.0" }, "require-dev": { - "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + "phpstan/phpstan": "1.10.39 || 1.4.10", + "phpunit/phpunit": "^9.6 || ^7.5" }, "type": "library", "autoload": { @@ -451,7 +452,7 @@ ], "support": { "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.11.0" + "source": "https://github.com/reactphp/promise/tree/v3.1.0" }, "funding": [ { @@ -459,7 +460,7 @@ "type": "open_collective" } ], - "time": "2023-11-16T16:16:50+00:00" + "time": "2023-11-16T16:21:57+00:00" }, { "name": "react/promise-timer", @@ -542,16 +543,16 @@ }, { "name": "react/socket", - "version": "v1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/reactphp/socket.git", - "reference": "21591111d3ea62e31f2254280ca0656bc2b1bda6" + "reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/socket/zipball/21591111d3ea62e31f2254280ca0656bc2b1bda6", - "reference": "21591111d3ea62e31f2254280ca0656bc2b1bda6", + "url": "https://api.github.com/repos/reactphp/socket/zipball/216d3aec0b87f04a40ca04f481e6af01bdd1d038", + "reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038", "shasum": "" }, "require": { @@ -563,7 +564,7 @@ "react/stream": "^1.2" }, "require-dev": { - "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", "react/async": "^4 || ^3 || ^2", "react/promise-stream": "^1.4", "react/promise-timer": "^1.10" @@ -571,7 +572,7 @@ "type": "library", "autoload": { "psr-4": { - "React\\Socket\\": "src" + "React\\Socket\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -610,7 +611,7 @@ ], "support": { "issues": "https://github.com/reactphp/socket/issues", - "source": "https://github.com/reactphp/socket/tree/v1.14.0" + "source": "https://github.com/reactphp/socket/tree/v1.15.0" }, "funding": [ { @@ -618,7 +619,7 @@ "type": "open_collective" } ], - "time": "2023-08-25T13:48:09+00:00" + "time": "2023-12-15T11:02:10+00:00" }, { "name": "react/stream", @@ -1007,16 +1008,16 @@ }, { "name": "azjezz/psl", - "version": "2.8.0", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/azjezz/psl.git", - "reference": "4955aa9d30790a3618b7933762359abdb41fd313" + "reference": "a8685b297644f3898c986e89b15309d31b1f47bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/azjezz/psl/zipball/4955aa9d30790a3618b7933762359abdb41fd313", - "reference": "4955aa9d30790a3618b7933762359abdb41fd313", + "url": "https://api.github.com/repos/azjezz/psl/zipball/a8685b297644f3898c986e89b15309d31b1f47bf", + "reference": "a8685b297644f3898c986e89b15309d31b1f47bf", "shasum": "" }, "require": { @@ -1069,7 +1070,7 @@ "description": "PHP Standard Library", "support": { "issues": "https://github.com/azjezz/psl/issues", - "source": "https://github.com/azjezz/psl/tree/2.8.0" + "source": "https://github.com/azjezz/psl/tree/2.9.0" }, "funding": [ { @@ -1077,7 +1078,7 @@ "type": "github" } ], - "time": "2023-11-22T07:49:48+00:00" + "time": "2023-12-29T10:23:32+00:00" }, { "name": "beberlei/assert", @@ -1356,16 +1357,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.3.7", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "76e46335014860eec1aa5a724799a00a2e47cc85" + "reference": "b66d11b7479109ab547f9405b97205640b17d385" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/76e46335014860eec1aa5a724799a00a2e47cc85", - "reference": "76e46335014860eec1aa5a724799a00a2e47cc85", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/b66d11b7479109ab547f9405b97205640b17d385", + "reference": "b66d11b7479109ab547f9405b97205640b17d385", "shasum": "" }, "require": { @@ -1377,7 +1378,7 @@ "phpstan/phpstan": "^0.12.55", "psr/log": "^1.0", "symfony/phpunit-bridge": "^4.2 || ^5", - "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0" + "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" }, "type": "library", "extra": { @@ -1412,7 +1413,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.3.7" + "source": "https://github.com/composer/ca-bundle/tree/1.4.0" }, "funding": [ { @@ -1428,7 +1429,7 @@ "type": "tidelift" } ], - "time": "2023-08-30T09:31:38+00:00" + "time": "2023-12-18T12:05:55+00:00" }, { "name": "composer/class-map-generator", @@ -2274,41 +2275,39 @@ }, { "name": "ergebnis/composer-normalize", - "version": "2.40.0", + "version": "2.41.1", "source": { "type": "git", "url": "https://github.com/ergebnis/composer-normalize.git", - "reference": "665de8e2bbe7c3e31b0a819b4dc0165289c0d230" + "reference": "01eb2d9b8623828ec2264f54d7782a25558d27b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/665de8e2bbe7c3e31b0a819b4dc0165289c0d230", - "reference": "665de8e2bbe7c3e31b0a819b4dc0165289c0d230", + "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/01eb2d9b8623828ec2264f54d7782a25558d27b2", + "reference": "01eb2d9b8623828ec2264f54d7782a25558d27b2", "shasum": "" }, "require": { "composer-plugin-api": "^2.0.0", "ergebnis/json": "^1.1.0", - "ergebnis/json-normalizer": "^4.3.0", + "ergebnis/json-normalizer": "^4.4.1", "ergebnis/json-printer": "^3.4.0", "ext-json": "*", "justinrainbow/json-schema": "^5.2.12", "localheinz/diff": "^1.1.1", "php": "~8.1.0 || ~8.2.0 || ~8.3.0" }, - "conflict": { - "symfony/console": "^7.0.0" - }, "require-dev": { - "composer/composer": "^2.6.5", + "composer/composer": "^2.6.6", "ergebnis/license": "^2.4.0", - "ergebnis/php-cs-fixer-config": "~6.13.1", + "ergebnis/php-cs-fixer-config": "~6.14.0", "ergebnis/phpunit-slow-test-detector": "^2.7.0", "fakerphp/faker": "^1.23.0", - "infection/infection": "~0.27.8", - "phpunit/phpunit": "^10.4.2", + "infection/infection": "~0.27.9", + "phpunit/phpunit": "^10.5.3", "psalm/plugin-phpunit": "~0.18.4", "rector/rector": "~0.18.12", + "roave/backward-compatibility-check": "^8.4.0", "symfony/filesystem": "^6.4.0", "vimeo/psalm": "^5.17.0" }, @@ -2350,7 +2349,7 @@ "security": "https://github.com/ergebnis/composer-normalize/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/composer-normalize" }, - "time": "2023-12-05T16:07:43+00:00" + "time": "2023-12-14T09:37:52+00:00" }, { "name": "ergebnis/json", @@ -2419,16 +2418,16 @@ }, { "name": "ergebnis/json-normalizer", - "version": "4.3.0", + "version": "4.4.1", "source": { "type": "git", "url": "https://github.com/ergebnis/json-normalizer.git", - "reference": "716fa0a5dcc75fbcb2c1c2e0542b2f56732460bd" + "reference": "d28f36af9763ee6bc4e2a2390c0348963df7881b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/716fa0a5dcc75fbcb2c1c2e0542b2f56732460bd", - "reference": "716fa0a5dcc75fbcb2c1c2e0542b2f56732460bd", + "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/d28f36af9763ee6bc4e2a2390c0348963df7881b", + "reference": "d28f36af9763ee6bc4e2a2390c0348963df7881b", "shasum": "" }, "require": { @@ -2442,18 +2441,19 @@ }, "require-dev": { "composer/semver": "^3.4.0", - "ergebnis/data-provider": "^3.0.0", - "ergebnis/license": "^2.2.0", - "ergebnis/php-cs-fixer-config": "~6.7.0", - "ergebnis/phpunit-slow-test-detector": "^2.3.0", + "ergebnis/data-provider": "^3.2.0", + "ergebnis/license": "^2.4.0", + "ergebnis/php-cs-fixer-config": "~6.14.0", + "ergebnis/phpunit-slow-test-detector": "^2.7.0", "fakerphp/faker": "^1.23.0", - "infection/infection": "~0.27.4", - "phpunit/phpunit": "^10.4.1", + "infection/infection": "~0.27.9", + "phpunit/phpunit": "^10.5.3", "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.18.5", - "symfony/filesystem": "^6.3.1", - "symfony/finder": "^6.3.5", - "vimeo/psalm": "^5.15.0" + "rector/rector": "~0.18.12", + "roave/backward-compatibility-check": "^8.4.0", + "symfony/filesystem": "^6.4.0", + "symfony/finder": "^6.4.0", + "vimeo/psalm": "^5.17.0" }, "suggest": { "composer/semver": "If you want to use ComposerJsonNormalizer or VersionConstraintNormalizer" @@ -2486,7 +2486,7 @@ "security": "https://github.com/ergebnis/json-normalizer/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/json-normalizer" }, - "time": "2023-10-10T15:15:03+00:00" + "time": "2023-12-14T09:30:24+00:00" }, { "name": "ergebnis/json-pointer", @@ -2862,16 +2862,16 @@ }, { "name": "fidry/cpu-core-counter", - "version": "0.5.1", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623" + "reference": "85193c0b0cb5c47894b5eaec906e946f054e7077" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/b58e5a3933e541dc286cc91fc4f3898bbc6f1623", - "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/85193c0b0cb5c47894b5eaec906e946f054e7077", + "reference": "85193c0b0cb5c47894b5eaec906e946f054e7077", "shasum": "" }, "require": { @@ -2879,13 +2879,13 @@ }, "require-dev": { "fidry/makefile": "^0.2.0", + "fidry/php-cs-fixer-config": "^1.1.2", "phpstan/extension-installer": "^1.2.0", "phpstan/phpstan": "^1.9.2", "phpstan/phpstan-deprecation-rules": "^1.0.0", "phpstan/phpstan-phpunit": "^1.2.2", "phpstan/phpstan-strict-rules": "^1.4.4", - "phpunit/phpunit": "^9.5.26 || ^8.5.31", - "theofidry/php-cs-fixer-config": "^1.0", + "phpunit/phpunit": "^8.5.31 || ^9.5.26", "webmozarts/strict-phpunit": "^7.5" }, "type": "library", @@ -2911,7 +2911,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/0.5.1" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.0.0" }, "funding": [ { @@ -2919,7 +2919,7 @@ "type": "github" } ], - "time": "2022-12-24T12:35:10+00:00" + "time": "2023-09-17T21:38:23+00:00" }, { "name": "filp/whoops", @@ -3832,16 +3832,16 @@ }, { "name": "jetbrains/phpstorm-stubs", - "version": "v2023.2", + "version": "v2023.3", "source": { "type": "git", "url": "https://github.com/JetBrains/phpstorm-stubs.git", - "reference": "3bb9c8a1050ad324c2dca7964487fa9f081f1005" + "reference": "99d8bcab934ae5362f33660b1cd4b8c4d617c40b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/3bb9c8a1050ad324c2dca7964487fa9f081f1005", - "reference": "3bb9c8a1050ad324c2dca7964487fa9f081f1005", + "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/99d8bcab934ae5362f33660b1cd4b8c4d617c40b", + "reference": "99d8bcab934ae5362f33660b1cd4b8c4d617c40b", "shasum": "" }, "require-dev": { @@ -3874,9 +3874,9 @@ "type" ], "support": { - "source": "https://github.com/JetBrains/phpstorm-stubs/tree/v2023.2" + "source": "https://github.com/JetBrains/phpstorm-stubs/tree/v2023.3" }, - "time": "2023-07-14T12:50:15+00:00" + "time": "2023-11-01T18:52:29+00:00" }, { "name": "justinrainbow/json-schema", @@ -4256,33 +4256,33 @@ }, { "name": "nikolaposa/version", - "version": "4.1.1", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/nikolaposa/version.git", - "reference": "f6bdd64be914940529b843a67335d6386d980cec" + "reference": "003fefa14f47cd44917546285e39d196af062a95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikolaposa/version/zipball/f6bdd64be914940529b843a67335d6386d980cec", - "reference": "f6bdd64be914940529b843a67335d6386d980cec", + "url": "https://api.github.com/repos/nikolaposa/version/zipball/003fefa14f47cd44917546285e39d196af062a95", + "reference": "003fefa14f47cd44917546285e39d196af062a95", "shasum": "" }, "require": { "beberlei/assert": "^3.2", - "php": "^7.2 || ^8.0" + "php": "^8.1" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.17", - "phpstan/phpstan": "^0.12.10", - "phpstan/phpstan-beberlei-assert": "^0.12.2", - "phpstan/phpstan-phpunit": "^0.12.6", - "phpunit/phpunit": "^8.0" + "friendsofphp/php-cs-fixer": "^3.44", + "phpstan/phpstan": "^1.10", + "phpstan/phpstan-beberlei-assert": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^10.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1.x-dev" + "dev-master": "4.2.x-dev" } }, "autoload": { @@ -4311,9 +4311,9 @@ ], "support": { "issues": "https://github.com/nikolaposa/version/issues", - "source": "https://github.com/nikolaposa/version/tree/4.1.1" + "source": "https://github.com/nikolaposa/version/tree/4.2.0" }, - "time": "2023-08-04T17:13:40+00:00" + "time": "2023-12-29T22:07:54+00:00" }, { "name": "nunomaduro/collision", @@ -5445,16 +5445,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.24.4", + "version": "1.25.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496" + "reference": "bd84b629c8de41aa2ae82c067c955e06f1b00240" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6bd0c26f3786cd9b7c359675cb789e35a8e07496", - "reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bd84b629c8de41aa2ae82c067c955e06f1b00240", + "reference": "bd84b629c8de41aa2ae82c067c955e06f1b00240", "shasum": "" }, "require": { @@ -5486,22 +5486,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.4" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.25.0" }, - "time": "2023-11-26T18:29:22+00:00" + "time": "2024-01-04T17:06:16+00:00" }, { "name": "phpstan/phpstan", - "version": "1.10.49", + "version": "1.10.55", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "9367ba4c4f6ad53e9efb594d74a8941563caccf6" + "reference": "9a88f9d18ddf4cf54c922fbeac16c4cb164c5949" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9367ba4c4f6ad53e9efb594d74a8941563caccf6", - "reference": "9367ba4c4f6ad53e9efb594d74a8941563caccf6", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9a88f9d18ddf4cf54c922fbeac16c4cb164c5949", + "reference": "9a88f9d18ddf4cf54c922fbeac16c4cb164c5949", "shasum": "" }, "require": { @@ -5550,7 +5550,7 @@ "type": "tidelift" } ], - "time": "2023-12-12T10:05:12+00:00" + "time": "2024-01-08T12:32:40+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -5805,23 +5805,23 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.29", + "version": "9.2.30", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" + "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089", + "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.15", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -5871,7 +5871,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.30" }, "funding": [ { @@ -5879,7 +5879,7 @@ "type": "github" } ], - "time": "2023-09-19T04:57:46+00:00" + "time": "2023-12-22T06:47:57+00:00" }, { "name": "phpunit/php-file-iterator", @@ -6741,22 +6741,21 @@ }, { "name": "roave/backward-compatibility-check", - "version": "8.4.0", + "version": "8.6.0", "source": { "type": "git", "url": "https://github.com/Roave/BackwardCompatibilityCheck.git", - "reference": "9b45bc3431f3dc651a8f2d6e199ca0d1e60a9978" + "reference": "5e533114a996f73a7551846c06c59a80185f4d16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/BackwardCompatibilityCheck/zipball/9b45bc3431f3dc651a8f2d6e199ca0d1e60a9978", - "reference": "9b45bc3431f3dc651a8f2d6e199ca0d1e60a9978", + "url": "https://api.github.com/repos/Roave/BackwardCompatibilityCheck/zipball/5e533114a996f73a7551846c06c59a80185f4d16", + "reference": "5e533114a996f73a7551846c06c59a80185f4d16", "shasum": "" }, "require": { "azjezz/psl": "^2.3.1", - "composer/composer": "^2.5.1", - "ext-json": "*", + "composer/composer": "^2.6.4", "nikic/php-parser": "^4.15.3", "nikolaposa/version": "^4.1.0", "ocramius/package-versions": "^2.7.0", @@ -6804,28 +6803,28 @@ "description": "Tool to compare two revisions of a public API to check for BC breaks", "support": { "issues": "https://github.com/Roave/BackwardCompatibilityCheck/issues", - "source": "https://github.com/Roave/BackwardCompatibilityCheck/tree/8.4.0" + "source": "https://github.com/Roave/BackwardCompatibilityCheck/tree/8.6.0" }, - "time": "2023-11-25T16:28:35+00:00" + "time": "2023-12-20T14:01:33+00:00" }, { "name": "roave/better-reflection", - "version": "6.19.0", + "version": "6.21.0", "source": { "type": "git", "url": "https://github.com/Roave/BetterReflection.git", - "reference": "92e9cbd9ccfea0924135a29f4be3959cd59cf54c" + "reference": "7f9bf2c73d80c71599aa84b2cd78360346049f6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/BetterReflection/zipball/92e9cbd9ccfea0924135a29f4be3959cd59cf54c", - "reference": "92e9cbd9ccfea0924135a29f4be3959cd59cf54c", + "url": "https://api.github.com/repos/Roave/BetterReflection/zipball/7f9bf2c73d80c71599aa84b2cd78360346049f6a", + "reference": "7f9bf2c73d80c71599aa84b2cd78360346049f6a", "shasum": "" }, "require": { "ext-json": "*", - "jetbrains/phpstorm-stubs": "2023.2", - "nikic/php-parser": "^4.17.1", + "jetbrains/phpstorm-stubs": "2023.3", + "nikic/php-parser": "^4.18.0", "php": "~8.1.0 || ~8.2.0 || ~8.3.0", "roave/signature": "^1.8.0" }, @@ -6834,11 +6833,11 @@ }, "require-dev": { "doctrine/coding-standard": "^12.0.0", - "phpstan/phpstan": "^1.10.47", + "phpstan/phpstan": "^1.10.50", "phpstan/phpstan-phpunit": "^1.3.15", - "phpunit/phpunit": "^10.5.2", + "phpunit/phpunit": "^10.5.5", "roave/infection-static-analysis-plugin": "^1.34.0", - "vimeo/psalm": "5.17.0" + "vimeo/psalm": "5.18.0" }, "suggest": { "composer/composer": "Required to use the ComposerSourceLocator" @@ -6878,9 +6877,9 @@ "description": "Better Reflection - an improved code reflection API", "support": { "issues": "https://github.com/Roave/BetterReflection/issues", - "source": "https://github.com/Roave/BetterReflection/tree/6.19.0" + "source": "https://github.com/Roave/BetterReflection/tree/6.21.0" }, - "time": "2023-12-07T10:58:42+00:00" + "time": "2024-01-04T16:52:13+00:00" }, { "name": "roave/infection-static-analysis-plugin", @@ -7345,20 +7344,20 @@ }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -7390,7 +7389,7 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" }, "funding": [ { @@ -7398,7 +7397,7 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-12-22T06:19:30+00:00" }, { "name": "sebastian/diff", @@ -7672,20 +7671,20 @@ }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -7717,7 +7716,7 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" }, "funding": [ { @@ -7725,7 +7724,7 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-12-22T06:20:34+00:00" }, { "name": "sebastian/object-enumerator", @@ -8068,16 +8067,16 @@ }, { "name": "seld/jsonlint", - "version": "1.10.0", + "version": "1.10.1", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1" + "reference": "76d449a358ece77d6f1d6331c68453e657172202" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/594fd6462aad8ecee0b45ca5045acea4776667f1", - "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/76d449a358ece77d6f1d6331c68453e657172202", + "reference": "76d449a358ece77d6f1d6331c68453e657172202", "shasum": "" }, "require": { @@ -8104,7 +8103,7 @@ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "homepage": "https://seld.be" } ], "description": "JSON Linter", @@ -8116,7 +8115,7 @@ ], "support": { "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.10.0" + "source": "https://github.com/Seldaek/jsonlint/tree/1.10.1" }, "funding": [ { @@ -8128,7 +8127,7 @@ "type": "tidelift" } ], - "time": "2023-05-11T13:16:46+00:00" + "time": "2023-12-18T13:03:25+00:00" }, { "name": "seld/phar-utils", @@ -8524,16 +8523,16 @@ }, { "name": "symfony/console", - "version": "v6.4.1", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd" + "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a550a7c99daeedef3f9d23fb82e3531525ff11fd", - "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd", + "url": "https://api.github.com/repos/symfony/console/zipball/0254811a143e6bc6c8deea08b589a7e68a37f625", + "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625", "shasum": "" }, "require": { @@ -8598,7 +8597,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.1" + "source": "https://github.com/symfony/console/tree/v6.4.2" }, "funding": [ { @@ -8614,20 +8613,20 @@ "type": "tidelift" } ], - "time": "2023-11-30T10:54:28+00:00" + "time": "2023-12-10T16:15:48+00:00" }, { "name": "symfony/dependency-injection", - "version": "v7.0.1", + "version": "v7.0.2", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "f6667642954bce638733f254c39e5b5700b47ba4" + "reference": "bd25ef7c937b9da12510bdc4f1c66728f19620e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f6667642954bce638733f254c39e5b5700b47ba4", - "reference": "f6667642954bce638733f254c39e5b5700b47ba4", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/bd25ef7c937b9da12510bdc4f1c66728f19620e3", + "reference": "bd25ef7c937b9da12510bdc4f1c66728f19620e3", "shasum": "" }, "require": { @@ -8678,7 +8677,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v7.0.1" + "source": "https://github.com/symfony/dependency-injection/tree/v7.0.2" }, "funding": [ { @@ -8694,7 +8693,7 @@ "type": "tidelift" } ], - "time": "2023-12-01T15:10:06+00:00" + "time": "2023-12-28T19:18:20+00:00" }, { "name": "symfony/deprecation-contracts", @@ -9543,16 +9542,16 @@ }, { "name": "symfony/process", - "version": "v7.0.0", + "version": "v7.0.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "13bdb1670c7f510494e04fcb2bfa29af63db9c0d" + "reference": "acd3eb5cb02382c1cb0287ba29b2908cc6ffa83a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/13bdb1670c7f510494e04fcb2bfa29af63db9c0d", - "reference": "13bdb1670c7f510494e04fcb2bfa29af63db9c0d", + "url": "https://api.github.com/repos/symfony/process/zipball/acd3eb5cb02382c1cb0287ba29b2908cc6ffa83a", + "reference": "acd3eb5cb02382c1cb0287ba29b2908cc6ffa83a", "shasum": "" }, "require": { @@ -9584,7 +9583,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.0.0" + "source": "https://github.com/symfony/process/tree/v7.0.2" }, "funding": [ { @@ -9600,7 +9599,7 @@ "type": "tidelift" } ], - "time": "2023-11-20T16:43:42+00:00" + "time": "2023-12-24T09:15:37+00:00" }, { "name": "symfony/property-access", @@ -9763,16 +9762,16 @@ }, { "name": "symfony/serializer", - "version": "v7.0.1", + "version": "v7.0.2", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "9c8f67c1444adf6dbcf90fb76da5b2f5c43af0ff" + "reference": "dd7d7612f9ae288889caba4bdff79424ce4ffdf0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/9c8f67c1444adf6dbcf90fb76da5b2f5c43af0ff", - "reference": "9c8f67c1444adf6dbcf90fb76da5b2f5c43af0ff", + "url": "https://api.github.com/repos/symfony/serializer/zipball/dd7d7612f9ae288889caba4bdff79424ce4ffdf0", + "reference": "dd7d7612f9ae288889caba4bdff79424ce4ffdf0", "shasum": "" }, "require": { @@ -9838,7 +9837,7 @@ "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v7.0.1" + "source": "https://github.com/symfony/serializer/tree/v7.0.2" }, "funding": [ { @@ -9854,25 +9853,25 @@ "type": "tidelift" } ], - "time": "2023-12-01T15:10:06+00:00" + "time": "2023-12-29T15:37:40+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.4.0", + "version": "v3.4.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838" + "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b3313c2dbffaf71c8de2934e2ea56ed2291a3838", - "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/fe07cbc8d837f60caf7018068e350cc5163681a0", + "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0", "shasum": "" }, "require": { "php": ">=8.1", - "psr/container": "^2.0" + "psr/container": "^1.1|^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -9920,7 +9919,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.4.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.4.1" }, "funding": [ { @@ -9936,7 +9935,7 @@ "type": "tidelift" } ], - "time": "2023-07-30T20:28:31+00:00" + "time": "2023-12-26T14:02:43+00:00" }, { "name": "symfony/stopwatch", @@ -10002,16 +10001,16 @@ }, { "name": "symfony/string", - "version": "v7.0.0", + "version": "v7.0.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "92bd2bfbba476d4a1838e5e12168bef2fd1e6620" + "reference": "cc78f14f91f5e53b42044d0620961c48028ff9f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/92bd2bfbba476d4a1838e5e12168bef2fd1e6620", - "reference": "92bd2bfbba476d4a1838e5e12168bef2fd1e6620", + "url": "https://api.github.com/repos/symfony/string/zipball/cc78f14f91f5e53b42044d0620961c48028ff9f5", + "reference": "cc78f14f91f5e53b42044d0620961c48028ff9f5", "shasum": "" }, "require": { @@ -10068,7 +10067,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.0.0" + "source": "https://github.com/symfony/string/tree/v7.0.2" }, "funding": [ { @@ -10084,20 +10083,20 @@ "type": "tidelift" } ], - "time": "2023-11-29T08:40:23+00:00" + "time": "2023-12-10T16:54:46+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.4.0", + "version": "v3.4.1", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "dee0c6e5b4c07ce851b462530088e64b255ac9c5" + "reference": "06450585bf65e978026bda220cdebca3f867fde7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/dee0c6e5b4c07ce851b462530088e64b255ac9c5", - "reference": "dee0c6e5b4c07ce851b462530088e64b255ac9c5", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/06450585bf65e978026bda220cdebca3f867fde7", + "reference": "06450585bf65e978026bda220cdebca3f867fde7", "shasum": "" }, "require": { @@ -10146,7 +10145,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.4.0" + "source": "https://github.com/symfony/translation-contracts/tree/v3.4.1" }, "funding": [ { @@ -10162,20 +10161,20 @@ "type": "tidelift" } ], - "time": "2023-07-25T15:08:44+00:00" + "time": "2023-12-26T14:02:43+00:00" }, { "name": "symfony/validator", - "version": "v7.0.0", + "version": "v7.0.2", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "616b39ffb22c1519f7fd2582b8052cde4c2d0b9f" + "reference": "24911cba25f0ef2a8e23327c100664502e1b95cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/616b39ffb22c1519f7fd2582b8052cde4c2d0b9f", - "reference": "616b39ffb22c1519f7fd2582b8052cde4c2d0b9f", + "url": "https://api.github.com/repos/symfony/validator/zipball/24911cba25f0ef2a8e23327c100664502e1b95cb", + "reference": "24911cba25f0ef2a8e23327c100664502e1b95cb", "shasum": "" }, "require": { @@ -10240,7 +10239,7 @@ "description": "Provides tools to validate values", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/validator/tree/v7.0.0" + "source": "https://github.com/symfony/validator/tree/v7.0.2" }, "funding": [ { @@ -10256,20 +10255,20 @@ "type": "tidelift" } ], - "time": "2023-11-29T08:40:23+00:00" + "time": "2023-12-30T09:57:06+00:00" }, { "name": "symfony/var-exporter", - "version": "v7.0.1", + "version": "v7.0.2", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "a3d7c877414fcd59ab7075ecdc3b8f9c00f7bcc3" + "reference": "345c62fefe92243c3a06fc0cc65f2ec1a47e0764" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/a3d7c877414fcd59ab7075ecdc3b8f9c00f7bcc3", - "reference": "a3d7c877414fcd59ab7075ecdc3b8f9c00f7bcc3", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/345c62fefe92243c3a06fc0cc65f2ec1a47e0764", + "reference": "345c62fefe92243c3a06fc0cc65f2ec1a47e0764", "shasum": "" }, "require": { @@ -10314,7 +10313,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v7.0.1" + "source": "https://github.com/symfony/var-exporter/tree/v7.0.2" }, "funding": [ { @@ -10330,7 +10329,7 @@ "type": "tidelift" } ], - "time": "2023-11-30T11:38:21+00:00" + "time": "2023-12-27T08:42:13+00:00" }, { "name": "symfony/yaml", @@ -10567,16 +10566,16 @@ }, { "name": "vimeo/psalm", - "version": "5.17.0", + "version": "5.18.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "c620f6e80d0abfca532b00bda366062aaedf6e5d" + "reference": "b113f3ed0259fd6e212d87c3df80eec95a6abf19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/c620f6e80d0abfca532b00bda366062aaedf6e5d", - "reference": "c620f6e80d0abfca532b00bda366062aaedf6e5d", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/b113f3ed0259fd6e212d87c3df80eec95a6abf19", + "reference": "b113f3ed0259fd6e212d87c3df80eec95a6abf19", "shasum": "" }, "require": { @@ -10595,7 +10594,7 @@ "ext-tokenizer": "*", "felixfbecker/advanced-json-rpc": "^3.1", "felixfbecker/language-server-protocol": "^1.5.2", - "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1", + "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1 || ^1.0.0", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", "nikic/php-parser": "^4.16", "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", @@ -10673,7 +10672,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2023-12-03T20:21:41+00:00" + "time": "2023-12-16T09:37:35+00:00" }, { "name": "webmozart/assert", diff --git a/src/Redis.php b/src/Redis.php index d5672f3..9b47cba 100644 --- a/src/Redis.php +++ b/src/Redis.php @@ -29,6 +29,7 @@ public function get($key, $default = null): PromiseInterface /** * @psalm-suppress MissingClosureParamType * @psalm-suppress TooManyTemplateParams + * @psalm-suppress InvalidArgument */ return $this->has($key)->then(function ($result) use ($key): PromiseInterface { if ($result === false) { @@ -101,7 +102,21 @@ public function setMultiple(array $values, $ttl = null) $promises[$key] = $this->set((string) $key, $value, $ttl); } - return all($promises); + /** + * @param PromiseInterface $bools + * + * @psalm-suppress InvalidArgument + */ + return all($promises)->then(static function (array $bools): bool { + /** @psalm-suppress MixedAssignment */ + foreach ($bools as $bool) { + if (! $bool) { + return false; + } + } + + return true; + }); } /** @inheritDoc */ @@ -111,11 +126,8 @@ public function deleteMultiple(array $keys) $keys[$index] = $this->prefix . $key; } - /** - * @phpstan-ignore-next-line - * @psalm-suppress InvalidArgument - */ - return $this->client->del(...$keys)->then( + /** @psalm-suppress InvalidArgument */ + return $this->client->del(...$keys)->then( /** @phpstan-ignore-line */ static fn (): PromiseInterface => resolve(true), static fn (): PromiseInterface => resolve(false), ); @@ -125,21 +137,29 @@ public function deleteMultiple(array $keys) public function clear() { /** - * @phpstan-ignore-next-line * @psalm-suppress TooManyTemplateParams + * @psalm-suppress InvalidArgument */ - return $this->client->keys($this->prefix . '*')->then(function (array $keys): PromiseInterface { + return $this->client->keys($this->prefix . '*')->then( /** @phpstan-ignore-line */ + function (array $keys): PromiseInterface { /** @var array $keys */ - $keys = preg_replace('|^' . preg_quote($this->prefix) . '|', '', $keys); + $keys = preg_replace('|^' . preg_quote($this->prefix) . '|', '', $keys); - return $this->deleteMultiple($keys); - }); + return $this->deleteMultiple($keys); + }, + ); } - /** @inheritDoc */ + /** + * @inheritDoc + * @psalm-suppress MixedReturnTypeCoercion + */ public function has($key) { - /** @phpstan-ignore-next-line */ + /** + * @psalm-suppress MixedReturnTypeCoercion + * @phpstan-ignore-next-line + */ return $this->client->exists($this->prefix . $key); } } diff --git a/tests/ClientStub.php b/tests/ClientStub.php index 7d445aa..f98461f 100644 --- a/tests/ClientStub.php +++ b/tests/ClientStub.php @@ -31,34 +31,52 @@ public function close(): void // TODO: Implement close() method. } + /** + * @return PromiseInterface + */ public function exists(): PromiseInterface { - return resolve(); + return resolve(true); } + /** + * @return PromiseInterface + */ public function get(): PromiseInterface { - return resolve(); + return resolve(null); } + /** + * @return PromiseInterface + */ public function set(): PromiseInterface { - return resolve(); + return resolve(null); } + /** + * @return PromiseInterface + */ public function psetex(): PromiseInterface { - return resolve(); + return resolve(null); } + /** + * @return PromiseInterface + */ public function del(): PromiseInterface { - return resolve(); + return resolve(null); } + /** + * @return PromiseInterface> + */ public function keys(): PromiseInterface { - return resolve(); + return resolve(['string']); } /** diff --git a/tests/RedisTest.php b/tests/RedisTest.php index ec862bd..a672065 100644 --- a/tests/RedisTest.php +++ b/tests/RedisTest.php @@ -25,7 +25,7 @@ public function testGet(): void $client->get($prefix . $key)->shouldBeCalled()->willReturn(resolve($value)); $promise = (new Redis($client->reveal(), $prefix))->get($key); - self::assertSame($value, await($promise)); /** @phpstan-ignore-line */ + self::assertSame($value, await($promise)); } public function testGetNonExistant(): void @@ -35,7 +35,7 @@ public function testGetNonExistant(): void $key = 'key'; $client->exists($prefix . $key)->shouldBeCalled()->willReturn(resolve(0)); $client->get($prefix . $key)->shouldBeCalled()->willReturn(resolve(null)); - self::assertNull(await((new Redis($client->reveal(), $prefix))->get($key))); /** @phpstan-ignore-line */ + self::assertNull(await((new Redis($client->reveal(), $prefix))->get($key))); } public function testSet(): void @@ -56,7 +56,7 @@ public function testSetGlobalTtl(): void $value = 'value'; $ttl = 123; $client->psetex($prefix . $key, $ttl * 1000, $value)->shouldBeCalled()->willReturn(resolve(null)); - self::assertTrue(await((new Redis($client->reveal(), $prefix, $ttl))->set($key, $value))); /** @phpstan-ignore-line */ + self::assertTrue(await((new Redis($client->reveal(), $prefix, $ttl))->set($key, $value))); } public function testSetTtl(): void @@ -67,7 +67,7 @@ public function testSetTtl(): void $value = 'value'; $ttl = 123; $client->psetex($prefix . $key, $ttl * 1000, $value)->shouldBeCalled()->willReturn(resolve(null)); - self::assertTrue(await((new Redis($client->reveal(), $prefix))->set($key, $value, $ttl))); /** @phpstan-ignore-line */ + self::assertTrue(await((new Redis($client->reveal(), $prefix))->set($key, $value, $ttl))); } public function testSetTtlException(): void @@ -78,7 +78,7 @@ public function testSetTtlException(): void $value = 'value'; $ttl = 123; $client->psetex($prefix . $key, $ttl * 1000, $value)->shouldBeCalled()->willReturn(reject(new Exception('fail!'))); - self::assertFalse(await((new Redis($client->reveal(), $prefix))->set($key, $value, $ttl))); /** @phpstan-ignore-line */ + self::assertFalse(await((new Redis($client->reveal(), $prefix))->set($key, $value, $ttl))); } public function testSetException(): void @@ -88,7 +88,7 @@ public function testSetException(): void $key = 'key'; $value = 'value'; $client->set($prefix . $key, $value)->shouldBeCalled()->willReturn(reject(new Exception('fail!'))); - self::assertFalse(await((new Redis($client->reveal(), $prefix))->set($key, $value))); /** @phpstan-ignore-line */ + self::assertFalse(await((new Redis($client->reveal(), $prefix))->set($key, $value))); } public function testDelete(): void @@ -154,7 +154,7 @@ public function testSetMultiple(): void $value = 'value'; $ttl = 123; $client->psetex($prefix . $key, $ttl * 1000, $value)->shouldBeCalled()->willReturn(resolve(true)); - self::assertSame([$key => true], await((new Redis($client->reveal(), $prefix))->setMultiple([$key => $value], $ttl))); /** @phpstan-ignore-line */ + self::assertSame(true, await((new Redis($client->reveal(), $prefix))->setMultiple([$key => $value], $ttl))); /** @phpstan-ignore-line */ } public function testGetMultiple(): void @@ -165,6 +165,6 @@ public function testGetMultiple(): void $value = 'value'; $client->exists($prefix . $key)->shouldBeCalled()->willReturn(resolve(true)); $client->get($prefix . $key)->shouldBeCalled()->willReturn(resolve($value)); - self::assertSame([$key => $value], await((new Redis($client->reveal(), $prefix))->getMultiple([$key]))); /** @phpstan-ignore-line */ + self::assertSame([$key => $value], await((new Redis($client->reveal(), $prefix))->getMultiple([$key]))); } }