fix: Joomla 6 event type compatibility (hotfix) #208

Merged
jmiller merged 1 commits from fix/joomla6-event-hotfix into main 2026-06-28 18:48:25 +00:00
Owner

Summary

Hotfix cherry-picked from #207 (already merged to dev).

  • Remove strict type hints on onContentAfterSave() and onContentChangeState() in the content plugin
  • Joomla 6 dispatches Model\AfterSaveEvent instead of Content\AfterSaveEvent, causing a fatal TypeError on article save
  • Untyped $event parameters accept both Joomla 5 and 6 event objects

Test plan

  • Save an article on Joomla 6 -- no fatal error
  • Verify cross-posting triggers on article publish
## Summary Hotfix cherry-picked from #207 (already merged to dev). - Remove strict type hints on `onContentAfterSave()` and `onContentChangeState()` in the content plugin - Joomla 6 dispatches `Model\AfterSaveEvent` instead of `Content\AfterSaveEvent`, causing a fatal TypeError on article save - Untyped `$event` parameters accept both Joomla 5 and 6 event objects ## Test plan - [ ] Save an article on Joomla 6 -- no fatal error - [ ] Verify cross-posting triggers on article publish
jmiller added 1 commit 2026-06-28 18:48:12 +00:00
fix: remove Joomla 5-only event type hints for Joomla 6 compatibility
Universal: PR Check / Branch Policy (pull_request) Failing after 2s
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 5s
Universal: PR Check / Validate PR (pull_request) Failing after 5s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Universal: PR Check / Secret Scan (pull_request) Successful in 6s
Generic: Repo Health / Access control (pull_request) Successful in 1s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Failing after 2s
Generic: Project CI / Lint & Validate (pull_request) Successful in 19s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Failing after 5s
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 42s
Universal: Build & Release / Build & Release Pipeline (pull_request) Successful in 18s
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Successful in 5m40s
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 5m55s
Generic: Project CI / Tests (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report: Scripts Governance (pull_request) Has been cancelled
Generic: Repo Health / Report: Repository Health (pull_request) Has been cancelled
18e84fbcfe
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
jmiller merged commit fceb3d5bf5 into main 2026-06-28 18:48:25 +00:00
jmiller deleted branch fix/joomla6-event-hotfix 2026-06-28 18:48:25 +00:00
Sign in to join this conversation.
No Reviewers
No labels
Priority -
Type -
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoSuiteCross#208