From af74f7860be069c207a25752d45249f7ca7a0c6f Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 19 Jun 2025 17:53:33 +0200 Subject: [PATCH] Fixed nullable content for NewsItem in setContent signature #392 --- .changes/unreleased/Fixed-20250619-170142.yaml | 7 +++++++ src/Bundle/ChillMainBundle/Entity/NewsItem.php | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .changes/unreleased/Fixed-20250619-170142.yaml diff --git a/.changes/unreleased/Fixed-20250619-170142.yaml b/.changes/unreleased/Fixed-20250619-170142.yaml new file mode 100644 index 000000000..d9ee78e1b --- /dev/null +++ b/.changes/unreleased/Fixed-20250619-170142.yaml @@ -0,0 +1,7 @@ +kind: Fixed +body: | + Allow null and cast as string to setContent method for NewsItem +time: 2025-06-19T17:01:42.125730402+02:00 +custom: + Issue: "392" + SchemaChange: No schema change diff --git a/src/Bundle/ChillMainBundle/Entity/NewsItem.php b/src/Bundle/ChillMainBundle/Entity/NewsItem.php index 7acf2de86..371cc7f15 100644 --- a/src/Bundle/ChillMainBundle/Entity/NewsItem.php +++ b/src/Bundle/ChillMainBundle/Entity/NewsItem.php @@ -70,9 +70,9 @@ class NewsItem implements TrackCreationInterface, TrackUpdateInterface return $this->content; } - public function setContent(string $content): void + public function setContent(string|null $content): void { - $this->content = $content; + $this->content = (string) $content; } public function getStartDate(): ?\DateTimeImmutable