Skip to content

Phase 0: module skeleton for ImpressCMS 2.0 in IPF mode - #1

Merged
fiammybe merged 2 commits into
mainfrom
claude/project-thread-kfbxfw
Oct 25, 2026
Merged

fiammybe merged 2 commits into
mainfrom
claude/project-thread-kfbxfw

Conversation

@fiammybe

Copy link
Copy Markdown
Contributor

Requested by David · project thread

Summary

Phase 0 of the imforum plan: an empty module that installs and updates on ImpressCMS 2.0 in IPF mode, with CI on PHP 8.2 to 8.5. No forum functions yet; those start with the data model in phase 1.

  • src/icms_version.php: modname and dirname are both imforum. object_items is an empty array, which is enough for the core to set ipf = 1 and register src/class under mod_imforum (libraries/icms/module/Object.php).
  • src/include/common.php: defines IMFORUM_DB_VERSION. The core reads it with constant() and no defined() check during install and update (icms_db_legacy_updater_Handler::moduleUpgrade), so it has to exist from the start.
  • src/include/onupdate.php: has the icms_module_install_imforum / icms_module_update_imforum entry points and an empty imforum_db_upgrade_1(), which will create the indexes in phase 1. It also creates uploads/imforum with mode 0755 (iForum used 0777). The docblock explains why fields must be renamed over two releases: the updater drops undeclared columns before the upgrade functions run.
  • A placeholder user index and an admin index, each with a template.
  • English and Dutch language files (language/nederlands, the folder name the core uses), plus crowdin.yml with the core's language folder names.
  • New icons, generated from scratch. Nothing is copied from iForum: iForum is GPL and this repository is MIT.

Tooling

  • .github/workflows/ci.yml runs on PHP 8.2, 8.3, 8.4 and 8.5. It does php -l, then PHPStan level 6 against a checkout of fiammybe/impresscms (scanned only for signatures), then PHPUnit.
  • The unit tests check that icms_version.php matches what the core expects: names, referenced files, templates and the db version. They also check that an upgrade function exists for every db version, that the upload folder is not world-writable, and that Dutch defines exactly the same constants as English.

Testing

All of this was run locally on PHP 8.3:

  • php -l is clean on every file.
  • PHPUnit passes: 12 tests, 40 assertions.
  • PHPStan level 6 against the ImpressCMS 2.0.4 Beta core reports no errors.

Not tested: a real install and update on a running ImpressCMS 2.0 with MySQL, because there was no database in this environment. Please install the module once by hand to confirm.


Generated by Claude Code

- icms_version.php with modname imforum and an (empty) object_items array,
  which makes the core register class/ under mod_imforum and manage the tables
- include/common.php with IMFORUM_DB_VERSION, which the core reads during
  install and update without a defined() check
- include/onupdate.php with the install/update entry points, an empty
  imforum_db_upgrade_1() and an upload folder created with 0755
- placeholder user index and administration index with templates
- English and Dutch language files, Crowdin configuration for the rest
- CI on PHP 8.2 to 8.5: php -l, PHPStan level 6 against a core checkout,
  PHPUnit tests for the module definition, install routines and language parity

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MZy45V5RV9nx6Buq8vqKHr
@fiammybe fiammybe self-assigned this Oct 25, 2026
- admin/menu.php defines $headermenu; displayAdminMenu() counts it and
  fails on PHP 8 when it is null
- explain that the core skips the table sync and db upgrade steps while
  object_items is empty, so dbversion stays 0 until phase 1
- skip the world-write check on Windows, where every folder reports 0777
- README: ICMS_CORE_PATH for PHPStan, copy instead of symlink for a test site

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MZy45V5RV9nx6Buq8vqKHr
@fiammybe
fiammybe merged commit a29a075 into main Oct 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants