fix(install): guard package script against Cannot redeclare class fatal #301

Merged
jmiller merged 2 commits from fix/package-script-redeclare-guard into dev 2026-07-16 19:20:44 +00:00
Owner

Wraps Pkg_MokoSuiteBackupInstallerScript in a class_exists guard so the package update flow (which can include script.php twice in one request) no longer fatals with a compile-time Cannot redeclare class. Live error hit on suite.dev.

https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i

Wraps Pkg_MokoSuiteBackupInstallerScript in a class_exists guard so the package update flow (which can include script.php twice in one request) no longer fatals with a compile-time Cannot redeclare class. Live error hit on suite.dev. https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
jmiller added 1 commit 2026-07-16 19:16:18 +00:00
fix(install): guard package script against "Cannot redeclare class" fatal
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 44s
Generic: Project CI / Lint & Validate (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Universal: PR Check / Secret Scan (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Has been cancelled
Generic: Project CI / Tests (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
c70f024201
Package updates could fatal with a compile-time "Cannot redeclare class
Pkg_MokoSuiteBackupInstallerScript" when Joomla extracts/includes the
package script.php twice in one request (two tmp/install_* dirs). Because
the class is a top-level unconditional declaration it is early-bound at
compile time, so a runtime return can't prevent the redeclare — wrapping
it in `if (!class_exists(...)) { ... }` makes it a conditional (runtime)
declaration, so the second include is a no-op instead of a fatal.

Claude-Session: https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
jmiller added 1 commit 2026-07-16 19:17:12 +00:00
chore(version): pre-release bump to 02.65.03-dev [skip ci]
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
3644a99d07
jmiller merged commit 28adcd0778 into dev 2026-07-16 19:20:44 +00:00
jmiller deleted branch fix/package-script-redeclare-guard 2026-07-16 19:20:45 +00:00
Sign in to join this conversation.