refactor(sybgo): trim Sybgo to 7 lifecycle methods — EPIC #93 complete#110
Merged
Conversation
a0b43b7 to
16ff43b
Compare
#100) Removes Sybgo::get_cron_hooks() — callers (deactivate() and Uninstaller) now call Cron_Manager::get_hooks() directly as the canonical source. Updates Uninstaller and its tests to import Cron_Manager instead of Sybgo. Sybgo now contains exactly 7 methods: get_instance, __construct, get_library_config, init, build_modules, activate, deactivate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…now canonical Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
a084980 to
f884ae5
Compare
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
Removes
Sybgo::get_cron_hooks()— the last non-lifecycle method on the class.Uninstalleranddeactivate()now callCron_Manager::get_hooks()directly as the canonical source.Sybgois reduced to its target 7 methods:get_instance,__construct,get_library_config,init,build_modules,activate,deactivate. EPIC #93 is complete.Closes #100
Type of change
Detailed scenario
What was tested
No manual testing required — this is a pure identifier redirection.
Sybgo::get_cron_hooks()was already delegating toCron_Manager::get_hooks()in the previous sub-issue (#99), so the hook list returned is identical. The only observable behavior change is thatSybgo::get_cron_hooks()no longer exists as a callable method.Verified manually by running
vendor/bin/phpunit --testsuite Unitafter the change: 77 tests executed with the same 5 pre-existingDashboardWidgetTestfailures and no new regressions.How to test
wp cron event list | grep sybgoAffected Features & Quality Assurance Scope
Uninstaller)Technical description
Sybgo::get_cron_hooks()introduced in an earlier sub-issue already delegated entirely toCron_Manager::get_hooks(). This PR removes the wrapper and updates its two callers:Sybgo::deactivate()→Cron_Manager::get_hooks()Uninstaller::clear_cron_hooks()→Cron_Manager::get_hooks()(swapuse Sybgo\Sybgoforuse Sybgo\Cron_Manager)UninstallerTestupdated to match the new import.Cron_Manager::get_hooks()was already the canonical source (staticmethod returning all four hook names). Thedevelopment.mdPlugin Uninstall section is updated to referenceCron_Manager::get_hooks()instead of the removed method.See wp-plugin/docs/development.md.
New dependencies
None.
Risks
None identified. The hook list is identical — the method being removed was a one-line delegation that added no logic.
Mandatory Checklist
Code validation
Code style
Unticked items justification
N/A — all items apply and are satisfied. No new tests were written because the existing
UninstallerTest(updated to useCron_Manager) already exercises the affected code path.Additional Checks