From 76826c57f2df6540c99245a910ee21be9ca0cef1 Mon Sep 17 00:00:00 2001 From: "Javi H. Gil" Date: Fri, 19 Sep 2025 11:52:50 +0200 Subject: [PATCH 1/2] Fix cms 5.5 integration --- src/Entity/ArticleContent.php | 6 ++++++ src/SfsCmsBlogPlugin.php | 5 +++++ 2 files changed, 11 insertions(+) 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 [ From 0973052cf2a36c52188818c6ce8ad5ea9bc3dd43 Mon Sep 17 00:00:00 2001 From: "Javi H. Gil" Date: Fri, 19 Sep 2025 11:57:44 +0200 Subject: [PATCH 2/2] Remove symfony/translation 5.4 support --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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",