From ecf32d8e69c9f9da33b688dc8f9e8e7017b12fd7 Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Tue, 9 Aug 2022 15:26:49 +0200 Subject: [PATCH] Bump down to psr/simple-cache v2 --- composer.json | 2 +- composer.lock | 28 ++++++++++++++-------------- src/PSR16Adapter.php | 23 ++++++++++++++++------- 3 files changed, 31 insertions(+), 22 deletions(-) diff --git a/composer.json b/composer.json index 7013fe0..86e4a27 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ "require": { "php": "^8.1", "bentools/iterable-functions": "^2.0.1", - "psr/simple-cache": "^3.0", + "psr/simple-cache": "^2.0", "react/async": "^4.0", "react/cache": "^1.1", "thecodingmachine/safe": "^2.2 || ^1.3" diff --git a/composer.lock b/composer.lock index ffcfb43..1fd21fe 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": "9ce2eaae420670d0a1cc1aaf5e64ba47", + "content-hash": "305779bf6f0283391c79e9973c1664a8", "packages": [ { "name": "bentools/iterable-functions", @@ -55,16 +55,16 @@ }, { "name": "psr/simple-cache", - "version": "3.0.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/simple-cache.git", - "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" + "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", - "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/8707bf3cea6f710bf6ef05491234e3ab06f6432a", + "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a", "shasum": "" }, "require": { @@ -73,7 +73,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -100,9 +100,9 @@ "simple-cache" ], "support": { - "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" + "source": "https://github.com/php-fig/simple-cache/tree/2.0.0" }, - "time": "2021-10-29T13:26:27+00:00" + "time": "2021-10-29T13:22:09+00:00" }, { "name": "react/async", @@ -4771,16 +4771,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.6.4", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "135607f9ccc297d6923d49c2bcf309f509413215" + "reference": "367a8d9d5f7da2a0136422d27ce8840583926955" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/135607f9ccc297d6923d49c2bcf309f509413215", - "reference": "135607f9ccc297d6923d49c2bcf309f509413215", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/367a8d9d5f7da2a0136422d27ce8840583926955", + "reference": "367a8d9d5f7da2a0136422d27ce8840583926955", "shasum": "" }, "require": { @@ -4810,9 +4810,9 @@ "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.6.4" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.7.0" }, - "time": "2022-06-26T13:09:08+00:00" + "time": "2022-08-09T12:23:23+00:00" }, { "name": "phpstan/phpstan", diff --git a/src/PSR16Adapter.php b/src/PSR16Adapter.php index 2d77b47..a9914f9 100644 --- a/src/PSR16Adapter.php +++ b/src/PSR16Adapter.php @@ -23,7 +23,7 @@ public function __construct( * @inheritDoc * @phpstan-ignore-next-line */ - public function get(string $key, mixed $default = null): mixed + public function get(string $key, mixed $default = null) { /** * @psalm-suppress TooManyTemplateParams @@ -35,7 +35,7 @@ public function get(string $key, mixed $default = null): mixed * @inheritDoc * @phpstan-ignore-next-line */ - public function set(string $key, mixed $value, DateInterval|int|null $ttl = null): bool + public function set(string $key, mixed $value, DateInterval|int|null $ttl = null) { /** * @var bool @@ -44,7 +44,10 @@ public function set(string $key, mixed $value, DateInterval|int|null $ttl = null return await($this->cache->set($key, $value, $this->convertToSeconds($ttl))); } - public function delete(string $key): bool + /** + * @inheritDoc + */ + public function delete(string $key) { /** * @var bool @@ -53,7 +56,10 @@ public function delete(string $key): bool return await($this->cache->delete($key)); } - public function clear(): bool + /** + * @inheritDoc + */ + public function clear() { /** * @var bool @@ -81,7 +87,7 @@ public function getMultiple(iterable $keys, mixed $default = null): iterable * @inheritDoc * @phpstan-ignore-next-line */ - public function setMultiple(iterable $values, DateInterval|int|null $ttl = null): bool + public function setMultiple(iterable $values, DateInterval|int|null $ttl = null) { /** * @var bool @@ -94,7 +100,7 @@ public function setMultiple(iterable $values, DateInterval|int|null $ttl = null) /** * @inheritDoc */ - public function deleteMultiple(iterable $keys): bool + public function deleteMultiple(iterable $keys) { /** * @var bool @@ -105,7 +111,10 @@ public function deleteMultiple(iterable $keys): bool return await($this->cache->deleteMultiple(iterable_to_array($keys))); } - public function has(string $key): bool + /** + * @inheritDoc + */ + public function has(string $key) { /** * @var bool