-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Michael Beck edited this page Jun 8, 2026
·
3 revisions
A practical guide for XOOPS module developers: what xoops/rector-xoops does, how to run it on a
module, what every rule means, and how to write your own rules.
- Tool runtime: PHP 8.2+ · Rector 2.x. (The tool runs on 8.2+ even when modernising a XoopsCore25/PHP-7.4 module — Rector can target older output.)
-
Generated-code target: whatever you set with
withPhpVersion()/withPhpSets()— usuallyphp74for XoopsCore25 modules andphp82for XoopsCore27 (XOOPS 2.7's floor); go higher only if you're deliberately raising the module's PHP floor. The XOOPS rules themselves are PHP-level-agnostic. -
Scope: PHP only — it never touches
.tplfiles (Smarty templates are a separate XOOPS upgrade step). -
Namespace:
Xoops\Rector\(PSR-4 →src/). Rules inXoops\Rector\Rules\, sets viaXoops\Rector\Set\XoopsSetList.
Reading this as a wiki? Each numbered section below is self-contained and maps to one wiki page — the Contents list is the suggested Home / sidebar. (When you split it, this page becomes Home, and each
## N.heading becomes a page; the sub-headings under §3 and §4 are that page's in-page sections.)
- Why a XOOPS Rector package? — the AST-vs-regex rationale
-
Install & run on a module — prerequisites ·
rector.php· the two sets · standalone sweep - Rule reference — database · removed PHP · XOOPS API · MyTS & Smarty · risky set · planned Smarty 5
- Writing your own rule — anatomy · idempotency · configurable rules · traits · register · test
- Tips for XOOPS module developers
- What this package deliberately does NOT do
- Contributing