-
Notifications
You must be signed in to change notification settings - Fork 1
5. Tips for XOOPS module developers
github-actions[bot] edited this page Jun 8, 2026
·
2 revisions
-
Run the PHP pass (this tool) first, the template pass second. Smarty
.tplchanges are a separate XOOPS upgrade step. -
Make your module's
rector.phppath-tolerant. A module may haveclass/but nosrc/(or vice-versa). Filter your paths withis_dirso a missing directory never errors (the bundled standalonerector-xoops.phpdoes exactly this; this package's ownrector.phpis just QA config):->withPaths(array_filter([__DIR__.'/class', __DIR__.'/src', __DIR__.'/admin'], 'is_dir')). Add->withRootFiles()to also include top-level*.php. -
Profiles / PHP level. The XOOPS set is PHP-level-agnostic; set
withPhpSets()to your target (php82for XoopsCore27,php74for XoopsCore25 — run the tool on PHP 8.2+ either way; Rector can target older output). -
The DB read/write split is keyword-based. It classifies literal SQL. Dynamic SQL
(
$db->queryF($sql)where$sqlis a variable) defaults toquery()— review those by hand. -
Skip what you can't safely change.
vendor/,language/,templates/, generated files — exclude them viawithSkip(). -
Commit the reformat separately. Adopting the tool may reformat a module; keep that in its own
commit and add the SHA to
.git-blame-ignore-revssogit blamestays useful.