- {% for locale,title in entity.extraData.title %} + {% for locale,title in content_entity.extraData.title %}

{{ title }}

{% endfor %} - {% for locale,description in entity.extraData.description %} + {% for locale,description in content_entity.extraData.description %}

{{ description }}

{% endfor %} - {{ sfs_cms_block_by_type('article_header_data', {'article': entity.id}) }} + {{ sfs_cms_block_by_type('article_header_data', {'article': content_entity.id}) }} {{ form_row(form.data.main) }}
diff --git a/composer.json b/composer.json index e09ab4d..f6840ad 100644 --- a/composer.json +++ b/composer.json @@ -11,13 +11,13 @@ "symfony/translation": "^6.4 || ^7.4 || ^8.0" }, "require-dev": { - "softspring/cms-data-plugin": "^6.0@dev", "ergebnis/composer-normalize": "^2.50", "friendsofphp/php-cs-fixer": "^3.94", "guzzlehttp/guzzle": "^7.8.2", "guzzlehttp/promises": "^2.0", "phpstan/phpstan": "^2.1", - "rector/rector": "^2.3" + "rector/rector": "^2.3", + "softspring/cms-data-plugin": "^6.0@dev" }, "suggest": { "softspring/user-bundle": "If you want to use users as blog authors" diff --git a/src/Controller/ArticleController.php b/src/Controller/ArticleController.php index e72edf8..b1df5f0 100644 --- a/src/Controller/ArticleController.php +++ b/src/Controller/ArticleController.php @@ -88,6 +88,8 @@ public function listBlock(Request $request): Response */ public function latestBlock(Request $request): Response { + trigger_deprecation('softspring/cms-blog-plugin', '6.0', 'The "article_latest_list" block is deprecated, use the "article_link_list" module instead.'); + $locale = $this->setLocale($request); $query = $this->getPublicQuery($request); diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index cf68480..8459da5 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -1,5 +1,7 @@ addModelTransformer(new CallbackTransformer( fn (?array $tags): string => json_encode($tags ?? [], JSON_THROW_ON_ERROR), function (?string $tags): array { - if (empty($tags)) { + if (in_array($tags, [null, '', '0'], true)) { return []; } diff --git a/src/Form/Type/BlogArticleTagType.php b/src/Form/Type/BlogArticleTagType.php index f76f469..609dd42 100644 --- a/src/Form/Type/BlogArticleTagType.php +++ b/src/Form/Type/BlogArticleTagType.php @@ -1,5 +1,7 @@ articleTagManager->getExistingTags(); - $choices = array_combine($tags, $tags) ?: []; + $choices = array_combine($tags, $tags); $resolver->setDefaults([ 'required' => false, diff --git a/src/Model/ArticleAuthorInterface.php b/src/Model/ArticleAuthorInterface.php index 51ca9db..a2ce565 100644 --- a/src/Model/ArticleAuthorInterface.php +++ b/src/Model/ArticleAuthorInterface.php @@ -1,5 +1,7 @@