feat(modules): scaffold Module_Interface and five feature module stubs#104
Merged
Conversation
#94) Introduces the wp-plugin/modules/ directory with Module_Interface and five empty feature modules (Event, Report, Email, AI, Settings). Sybgo::init() now creates the three managers and boots all modules via build_modules() before delegating to the legacy init_*() sub-methods, which remain intact until each module's boot() is fully implemented in sub-issues #95–#99. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ction Documents the new wp-plugin/modules/ directory and the Module_Interface pattern introduced in #94. Explains where new domain wiring belongs and the boot() registration-only contract. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Description
Introduces the
wp-plugin/modules/directory with aModule_Interfacecontract and five empty feature module stubs (Event, Report, Email, AI, Settings).Sybgo::init()now creates the three managers and boots all modules viabuild_modules(), establishing the architecture that sub-issues #95–#99 will fill in.Closes #94
Type of change
Detailed scenario
What was tested
All five module
boot()methods are no-ops at this stage, so the plugin's runtime behaviour is identical to the develop baseline. Manual verification:wp cron event list— all four sybgo cron events still scheduled (freeze, send, cleanup, retry).wp cron event run sybgo_freeze_weekly_report— report frozen as expected; legacy callbacks still wired viainit_cron_schedules().How to test
composer dump-autoloadinwp-plugin/.cd tests/e2e && npx wp-env start.wp --path=... eval 'echo "ok";'.cd wp-plugin && vendor/bin/phpunit --testsuite=Unit— expect 49 passing, 5 pre-existing errors unrelated to this PR (Error_Tracker::get_effective_daily_capstub missing in develop).wp cron event list | grep sybgo.Affected Features & Quality Assurance Scope
The existing admin UI, cron callbacks, abilities, and event tracking are entirely unchanged at runtime — all legacy
init_*()sub-methods remain active and the new modules'boot()methods are no-ops. Risk surface is limited to the autoloader picking up the newmodules/classmap entry.Technical description
Documentation
Sybgo::init()now instantiatesCron_Manager,Admin_Manager, andAbility_Manager, callsboot()on each module returned bybuild_modules(), then delegates to the legacyinit_*()methods (which stay intact until #95–#99 each fill a module). This dual-path lets the refactor proceed incrementally with a passing test suite at every step.Each module class in
wp-plugin/modules/receives only the subset of managers it will eventually need (see the plan), making future constructor dependencies explicit before any logic is added.@phpstan-ignore property.onlyWrittenannotations suppress PHPStan warnings on properties that are intentionally stored but not yet read in the stubboot().See wp-plugin/docs/development.md for the updated project structure and a new "Feature Module Architecture" section explaining the pattern and where new domain wiring belongs.
New dependencies
None.
Risks
None identified. All
boot()methods are no-ops; existing behaviour is 100% preserved by the legacyinit_*()paths.Mandatory Checklist
Code validation
Code style
Unticked items justification
Tests: The module stubs have no logic to unit-test beyond "the class loads and
boot()returns void". Test coverage for each module's actual behaviour is scoped to sub-issues #95–#99.Additional Checks