diff --git a/composer.json b/composer.json index 0fab138..0fbe7fe 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "softspring/cms-bundle": "^5.5@dev", "scienta/doctrine-json-functions": "^5.2", "softspring/time-ago-bundle": "^5.5@dev", - "symfony/translation": "^5.4|^6.1|^7.0" + "symfony/translation": "^6.1|^7.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.68", diff --git a/src/Entity/ArticleContent.php b/src/Entity/ArticleContent.php index 00866b1..a80c1a5 100644 --- a/src/Entity/ArticleContent.php +++ b/src/Entity/ArticleContent.php @@ -19,6 +19,12 @@ class ArticleContent extends Content implements ArticleContentInterface, Article public function setPublishedVersion(?VersionInterface $publishedVersion): void { + if (null === $publishedVersion) { + $this->publishedVersion = null; + + return; + } + if (!$publishedVersion instanceof ContentVersionInterface) { throw new InvalidArgumentException('Published version must be an instance of ContentVersionInterface.'); } diff --git a/src/SfsCmsBlogPlugin.php b/src/SfsCmsBlogPlugin.php index dd07ff4..c5d5678 100644 --- a/src/SfsCmsBlogPlugin.php +++ b/src/SfsCmsBlogPlugin.php @@ -14,6 +14,11 @@ public function getPath(): string return \dirname(__DIR__); } + public static function getAlias(): string + { + return 'sfs_cms_blog'; + } + protected function getTargetEntities(): array { return [