Skip to content

Commit 6d6624c

Browse files
committed
Updated psr/simple-cache dependency to "^2.0||^3.0"
1 parent 735dfb2 commit 6d6624c

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

bin/ci/scripts/setup_gcp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
printenv BASE64_GOOGLE_APPLICATION_CREDENTIALS | base64 --decode > /tmp/phpfastcache-gac.json
3+
printenv BASE64_GOOGLE_APPLICATION_CREDENTIALS | base64 --decode > GOOGLE_APPLICATION_CREDENTIALS

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"require": {
2222
"php": ">=8.0",
2323
"psr/cache": "^2.0||^3.0",
24-
"psr/simple-cache": "^1.0.",
24+
"psr/simple-cache": "^2.0||^3.0",
2525
"ext-mbstring": "*",
2626
"ext-json": "*"
2727
},

lib/Phpfastcache/Exceptions/PhpfastcacheRootException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
use Exception;
1919

20-
class PhpfastcacheRootException extends Exception implements PhpfastcacheExceptionInterface
20+
abstract class PhpfastcacheRootException extends Exception implements PhpfastcacheExceptionInterface
2121
{
2222

2323
}

lib/Phpfastcache/Helper/Psr16Adapter.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ public function __construct($driver, ConfigurationOptionInterface $config = null
6262

6363
/**
6464
* @param string $key
65-
* @param mixed|null $default
66-
* @return mixed|null
65+
* @param mixed $default
66+
* @return mixed
6767
* @throws PhpfastcacheSimpleCacheException
6868
*/
69-
public function get($key, $default = null)
69+
public function get(string $key, mixed $default = null): mixed
7070
{
7171
try {
7272
$cacheItem = $this->internalCacheInstance->getItem($key);
@@ -87,7 +87,7 @@ public function get($key, $default = null)
8787
* @return bool
8888
* @throws PhpfastcacheSimpleCacheException
8989
*/
90-
public function set($key, $value, $ttl = null): bool
90+
public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool
9191
{
9292
try {
9393
$cacheItem = $this->internalCacheInstance
@@ -110,7 +110,7 @@ public function set($key, $value, $ttl = null): bool
110110
* @throws PhpfastcacheSimpleCacheException
111111
* @throws InvalidArgumentException
112112
*/
113-
public function delete($key): bool
113+
public function delete(string $key): bool
114114
{
115115
try {
116116
return $this->internalCacheInstance->deleteItem($key);
@@ -135,10 +135,10 @@ public function clear(): bool
135135
/**
136136
* @param iterable $keys
137137
* @param null $default
138-
* @return ExtendedCacheItemInterface[]|iterable
138+
* @return ExtendedCacheItemInterface[]
139139
* @throws PhpfastcacheSimpleCacheException
140140
*/
141-
public function getMultiple($keys, $default = null)
141+
public function getMultiple(iterable $keys, mixed $default = null): iterable
142142
{
143143
if ($keys instanceof Traversable) {
144144
$keys = \iterator_to_array($keys);
@@ -154,12 +154,12 @@ public function getMultiple($keys, $default = null)
154154
}
155155

156156
/**
157-
* @param string[] $values
157+
* @param iterable $values
158158
* @param null|int|DateInterval $ttl
159159
* @return bool
160160
* @throws PhpfastcacheSimpleCacheException
161161
*/
162-
public function setMultiple($values, $ttl = null): bool
162+
public function setMultiple(iterable $values, null|int|\DateInterval $ttl = null): bool
163163
{
164164
try {
165165
foreach ($values as $key => $value) {
@@ -180,12 +180,12 @@ public function setMultiple($values, $ttl = null): bool
180180
}
181181

182182
/**
183-
* @param iterable|array $keys
183+
* @param iterable $keys
184184
* @return bool
185185
* @throws PhpfastcacheSimpleCacheException
186186
* @throws InvalidArgumentException
187187
*/
188-
public function deleteMultiple($keys): bool
188+
public function deleteMultiple(iterable $keys): bool
189189
{
190190
try {
191191
if ($keys instanceof Traversable) {
@@ -207,7 +207,7 @@ public function deleteMultiple($keys): bool
207207
* @return bool
208208
* @throws PhpfastcacheSimpleCacheException
209209
*/
210-
public function has($key): bool
210+
public function has(string $key): bool
211211
{
212212
try {
213213
$cacheItem = $this->internalCacheInstance->getItem($key);

0 commit comments

Comments
 (0)