fix: testing fixes
Some checks failed
Build Test / test (pull_request) Successful in 26s
JS Unit Tests / test (pull_request) Failing after 27s
PHP Unit Tests / test (pull_request) Successful in 54s

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-05-16 00:10:02 -04:00
parent e8612c4e10
commit 7afee695c6
2 changed files with 16 additions and 17 deletions

View File

@@ -608,13 +608,11 @@ class Manager {
throw new InvalidArgumentException("Service '{$service->identifier()}' is not capable of creating collections");
}
// convert properties if necessary
if (is_array($properties)) {
$collection = $service->collectionFresh()->getProperties()->jsonDeserialize($properties);
} else {
$collection = $properties;
if ($properties instanceof CollectionPropertiesMutableInterface === false) {
$properties = $service->collectionFresh()->getProperties()->jsonDeserialize($properties);
}
// Create collection
return $service->collectionCreate($target, $collection, $options);
return $service->collectionCreate($target, $properties, $options);
}
/**
@@ -642,13 +640,11 @@ class Manager {
throw new InvalidArgumentException("Service '{$service->identifier()}' is not capable of updating collections");
}
// convert properties if necessary
if (is_array($properties)) {
$mutation = $service->collectionFresh()->getProperties()->jsonDeserialize($properties);
} else {
$mutation = $properties;
if ($properties instanceof CollectionPropertiesMutableInterface === false) {
$properties = $service->collectionFresh()->getProperties()->jsonDeserialize($properties);
}
// Update collection
return $service->collectionUpdate($target, $mutation);
return $service->collectionUpdate($target, $properties);
}
/**