diff --git a/Classes/Service/NodeService.php b/Classes/Service/NodeService.php index 63f61e5..55ea6a7 100644 --- a/Classes/Service/NodeService.php +++ b/Classes/Service/NodeService.php @@ -122,17 +122,17 @@ public function findOrCreateBetterEmbedRootNode(Context $context) */ public function findOrCreateBetterEmbedAssetCollection(string $title = self::ASSET_COLLECTION_TITLE): AssetCollection { - /** @var AssetCollection $asseteCollection */ - $asseteCollection = $this->assetCollectionRepository->findByTitle($title)->getFirst(); + /** @var AssetCollection $assetCollection */ + $assetCollection = $this->assetCollectionRepository->findByTitle($title)->getFirst(); - if ($asseteCollection == null) { - $asseteCollection = new AssetCollection($title); + if ($assetCollection === null) { + $assetCollection = new AssetCollection($title); - $this->assetCollectionRepository->add($asseteCollection); - $this->persistenceManager->whitelistObject($asseteCollection); + $this->assetCollectionRepository->add($assetCollection); + $this->persistenceManager->allowObject($assetCollection); } - return $asseteCollection; + return $assetCollection; } /** @@ -174,7 +174,7 @@ private function createTag(string $label, ArrayCollection $assetCollections): Ta $tag->setAssetCollections($assetCollections); $this->tagRepository->add($tag); - $this->persistenceManager->whitelistObject($tag); + $this->persistenceManager->allowObject($tag); return $tag; } diff --git a/composer.json b/composer.json index 0ef2777..54fe626 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "source": "https://github.com/betterembed/neos-betterembed" }, "require": { - "neos/neos": "^4.3 || ^5 || ^7", + "neos/neos": "^8", "guzzlehttp/guzzle": "^6.3" }, "authors": [