refactor: Joomla-7 forward-compatibility (replace deprecated Factory accessors & jexit) #84

Merged
jmiller merged 5 commits from dev into main 2026-06-28 19:51:00 +00:00
Owner

Summary

Follow-up to PR #83. Replaces APIs deprecated in Joomla 5 and slated for removal in Joomla 7. The extension already runs cleanly on Joomla 6 — this future-proofs it for 7.

  • Factory::getDbo()Factory::getContainer()->get(\Joomla\Database\DatabaseInterface::class) (uniform across plugins, controllers, static helpers, install script — works in every context without per-class trait assumptions)
  • Factory::getUser()Factory::getApplication()->getIdentity()
  • Factory::getSession()Factory::getApplication()->getSession()
  • jexit(Text::_('JINVALID_TOKEN'))throw new \RuntimeException(..., 403) — consistent with the access-denied checks already present in those controllers (uses PHP 8 throw-expressions to keep the one-line short-circuit form)

All changed PHP files pass php -l. No behavior change on Joomla 6.

Note

The earlier SQL update-version concern is already resolved: the release bumped to 01.05.00, which matches the 01.05.00.sql update slot.

🤖 Generated with Claude Code

## Summary Follow-up to PR #83. Replaces APIs deprecated in Joomla 5 and slated for removal in Joomla 7. The extension already runs cleanly on Joomla 6 — this future-proofs it for 7. - `Factory::getDbo()` → `Factory::getContainer()->get(\Joomla\Database\DatabaseInterface::class)` (uniform across plugins, controllers, static helpers, install script — works in every context without per-class trait assumptions) - `Factory::getUser()` → `Factory::getApplication()->getIdentity()` - `Factory::getSession()` → `Factory::getApplication()->getSession()` - `jexit(Text::_('JINVALID_TOKEN'))` → `throw new \RuntimeException(..., 403)` — consistent with the access-denied checks already present in those controllers (uses PHP 8 throw-expressions to keep the one-line short-circuit form) All changed PHP files pass `php -l`. No behavior change on Joomla 6. ### Note The earlier SQL update-version concern is already resolved: the release bumped to `01.05.00`, which matches the `01.05.00.sql` update slot. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jmiller added 2 commits 2026-06-28 19:47:58 +00:00
refactor: replace Joomla-7-deprecated APIs (forward compatibility)
Universal: Auto Version Bump / Version Bump (push) Successful in 12s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 15s
d6fb2816cf
Removes accessors deprecated in Joomla 5 and slated for removal in 7
(extension already runs on 6; this future-proofs for 7):
- Factory::getDbo() -> Factory::getContainer()->get(DatabaseInterface::class)
  across plugins, controllers, static helpers, and the install script
- Factory::getUser() -> Factory::getApplication()->getIdentity()
- Factory::getSession() -> Factory::getApplication()->getSession()
- jexit(Text::_('JINVALID_TOKEN')) -> throw new \RuntimeException(..., 403),
  consistent with the access-denied checks already in those controllers

Note: SQL update-version concern is already resolved — the release bumped
to 01.05.00, which matches the 01.05.00.sql update slot.
jmiller added 1 commit 2026-06-28 19:48:09 +00:00
jmiller added 1 commit 2026-06-28 19:50:31 +00:00
Merge origin/main into dev — resync after 01.05.00 release
Universal: PR Check / Branch Policy (pull_request) Successful in 3s
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 6s
Universal: PR Check / Validate PR (pull_request) Failing after 7s
Universal: Auto Version Bump / Version Bump (push) Successful in 16s
Generic: Project CI / Lint & Validate (pull_request) Successful in 18s
Generic: Repo Health / Access control (pull_request) Successful in 2s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 20s
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been skipped
Universal: PR Check / Secret Scan (pull_request) Successful in 47s
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 58s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Failing after 54s
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
2af8a72ca3
jmiller added 1 commit 2026-06-28 19:50:50 +00:00
chore(version): auto-bump patch 01.05.01-dev [skip ci]
Branch Cleanup / Delete merged branch (pull_request) Has been skipped
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Universal: Build & Release / Build & Release Pipeline (pull_request) Successful in 36s
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Successful in 5m24s
3ac54da149
jmiller merged commit 57333482e3 into main 2026-06-28 19:51:00 +00:00
Sign in to join this conversation.
No Reviewers
Priority -
Type -
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoSuiteOpenGraph#84