From 18e84fbcfeffc02b8bbd08361f839633873b0f10 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sun, 28 Jun 2026 13:47:45 -0500 Subject: [PATCH] fix: remove Joomla 5-only event type hints for Joomla 6 compatibility Joomla 6 dispatches Model\AfterSaveEvent instead of Content\AfterSaveEvent. Remove strict type hints on onContentAfterSave() and onContentChangeState() to accept both Joomla 5 and 6 event objects. Authored-by: Moko Consulting --- .../src/Extension/MokoSuiteCrossContent.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/packages/plg_content_mokosuitecross/src/Extension/MokoSuiteCrossContent.php b/source/packages/plg_content_mokosuitecross/src/Extension/MokoSuiteCrossContent.php index 57d8eb15..3b3c7e28 100644 --- a/source/packages/plg_content_mokosuitecross/src/Extension/MokoSuiteCrossContent.php +++ b/source/packages/plg_content_mokosuitecross/src/Extension/MokoSuiteCrossContent.php @@ -404,7 +404,7 @@ XML; /** * Dispatch cross-post when an article is saved and published. */ - public function onContentAfterSave(\Joomla\CMS\Event\Content\AfterSaveEvent $event): void + public function onContentAfterSave($event): void { $context = $event->getContext(); @@ -441,7 +441,7 @@ XML; /** * Dispatch cross-post when article state changes to published. */ - public function onContentChangeState(\Joomla\CMS\Event\Content\ContentChangeStateEvent $event): void + public function onContentChangeState($event): void { $context = $event->getContext();