Skip to content

Commit dfc004e

Browse files
committed
MemoryCacheStorage - var_export the data to reproduce certain issues
1 parent 367a316 commit dfc004e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Cache/MemoryCacheStorage.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace PHPStan\Cache;
44

5+
use function var_export;
6+
57
class MemoryCacheStorage implements CacheStorage
68
{
79

@@ -30,7 +32,9 @@ public function load(string $key, string $variableKey)
3032
*/
3133
public function save(string $key, string $variableKey, $data): void
3234
{
33-
$this->storage[$key] = new CacheItem($variableKey, $data);
35+
$item = new CacheItem($variableKey, $data);
36+
@var_export($item, true);
37+
$this->storage[$key] = $item;
3438
}
3539

3640
}

0 commit comments

Comments
 (0)