--- a/core/modules/config/src/StorageReplaceDataWrapper.php +++ b/core/modules/config/src/StorageReplaceDataWrapper.php @@ -44,6 +44,7 @@ public function __construct(StorageInterface $storage, $collection = StorageInterface::DEFAULT_COLLECTION) { $this->storage = $storage; $this->collection = $collection; + $this->replacementData[$collection] = []; } /** @@ -164,8 +165,10 @@ * {@inheritdoc} */ public function createCollection($collection) { - $this->collection = $collection; - return $this->storage->createCollection($collection); + return new static( + $this->storage->createCollection($collection), + $collection + ); } /**