From 3453c9aa852fbaa5c3074f0e7333d8d6f15ce26e Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Sun, 3 Mar 2024 18:12:23 +0700 Subject: [PATCH] Fix memory storage --- src/Storage/MemoryStorage.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Storage/MemoryStorage.php b/src/Storage/MemoryStorage.php index 6ad9338d2..1a7e3275c 100644 --- a/src/Storage/MemoryStorage.php +++ b/src/Storage/MemoryStorage.php @@ -34,6 +34,12 @@ public function read(string $type, ?string $id = null): array ]; } + if ($type === self::TYPE_OBJECTS) { + return [ + $this->idGenerator->getId() => array_merge(...array_values($this->getData())), + ]; + } + return [$this->idGenerator->getId() => $this->getData()]; }