Phase 14c-5: editor install module on iManager 2.0#28
Merged
Conversation
The /editor/install module manager is back online — discovers
site/modules/<Name>/<Name>.php candidates, lists them with their
install/uninstall state, and rewrites data/settings/custom.scriptor-
config.php with rolling backups in data/backups/configs/.
Compared to the legacy 618-line implementation this port:
- drops the brick/varexporter dependency in favour of PHP's
built-in var_export() (legacy code only ever emitted plain
config arrays, no closures);
- skips the install/uninstall lifecycle callbacks on loaded
modules (the legacy Module::install/uninstall hooks); the new
module interface lands post-Phase-17;
- skips the hook-mapping bridge — Plan §14e brings the proper
PSR-14 dispatcher; until then we don't touch config['hooks'].
The legacy moduleInfo() static contract is preserved: every module
class under site/modules/<Name>/<Name>.php is expected to expose
`public static function moduleInfo(): array`. Modules without it
are skipped silently.
EditorRouter routes /editor/install* to InstallModule and now has
no remaining placeholder slugs — 14c is functionally complete with
this PR. Dashboard text simplified accordingly.
Manual smoke (PHP built-in server, throwaway site/modules/Demo):
GET /editor/install 200, Demo (1.0.0) listed
GET /editor/install/Demo?action=install 302; custom.scriptor-config.php
contains modules.Demo
GET /editor/install 200, Demo now "active"
GET /editor/install/Demo?action=uninstall 302; modules.Demo gone,
1 backup file created
GET /editor/install/Demo?action=install 302 (no CSRF token)
config unchanged → reject ok
GET /editor/install (anonymous) 302 → /editor/auth/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The /editor/install module manager is back online — discovers site/modules//.php candidates, lists them with their install/uninstall state, and rewrites data/settings/custom.scriptor- config.php with rolling backups in data/backups/configs/.
Compared to the legacy 618-line implementation this port:
The legacy moduleInfo() static contract is preserved: every module class under site/modules//.php is expected to expose
public static function moduleInfo(): array. Modules without it are skipped silently.EditorRouter routes /editor/install* to InstallModule and now has no remaining placeholder slugs — 14c is functionally complete with this PR. Dashboard text simplified accordingly.
Manual smoke (PHP built-in server, throwaway site/modules/Demo):
GET /editor/install 200, Demo (1.0.0) listed
GET /editor/install/Demo?action=install 302; custom.scriptor-config.php
contains modules.Demo
GET /editor/install 200, Demo now "active"
GET /editor/install/Demo?action=uninstall 302; modules.Demo gone,
1 backup file created
GET /editor/install/Demo?action=install 302 (no CSRF token)
config unchanged → reject ok
GET /editor/install (anonymous) 302 → /editor/auth/