Skip to content

Commit

Permalink
Merge pull request #23 from webandco/feature/neos-8-compatibility
Browse files Browse the repository at this point in the history
Feature/neos 8 compatibility
  • Loading branch information
jonnitto authored Jul 22, 2022
2 parents 3ff5ed3 + c5f0245 commit d490b57
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions Classes/Service/NodeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down

0 comments on commit d490b57

Please sign in to comment.