chore: legacy mokojoomtos.php is dead code under Joomla 5 #101

Closed
opened 2026-05-22 03:30:33 +00:00 by jmiller · 1 comment
Owner

Description

Under Joomla 5's DI container, services/provider.php is the entry point and the legacy PlgSystemMokojoomtos class in mokojoomtos.php is never instantiated. The file must remain listed in the manifest (<filename plugin="mokojoomtos">) but the class body is dead code.

Recommendation

Strip the class to a minimal stub with a comment explaining it's required by Joomla's plugin loader but not executed. Any logic changes should only be made in src/Extension/MokoJoomTOS.php.

Files

  • src/mokojoomtos.php - entire class is dead code
## Description Under Joomla 5's DI container, `services/provider.php` is the entry point and the legacy `PlgSystemMokojoomtos` class in `mokojoomtos.php` is never instantiated. The file must remain listed in the manifest (`<filename plugin="mokojoomtos">`) but the class body is dead code. ## Recommendation Strip the class to a minimal stub with a comment explaining it's required by Joomla's plugin loader but not executed. Any logic changes should only be made in `src/Extension/MokoJoomTOS.php`. ## Files - `src/mokojoomtos.php` - entire class is dead code
jmiller added the joomlapriority: lowcode-quality labels 2026-05-22 03:30:33 +00:00
Author
Owner

Testing Steps -- Legacy mokojoomtos.php stub

Test

  1. Install the plugin on Joomla 5.x
  2. Set site offline, visit configured slug
  3. Expected: Plugin works normally (logic runs from src/Extension/MokoJoomTOS.php)
  4. Open mokojoomtos.php in the installed plugin directory on the server
  5. Expected: File contains only a minimal stub class with no business logic

Pass criteria

  • Plugin functionality is unaffected
  • mokojoomtos.php contains only the stub class
## Testing Steps -- Legacy mokojoomtos.php stub ### Test 1. Install the plugin on Joomla 5.x 2. Set site offline, visit configured slug 3. **Expected:** Plugin works normally (logic runs from `src/Extension/MokoJoomTOS.php`) 4. Open `mokojoomtos.php` in the installed plugin directory on the server 5. **Expected:** File contains only a minimal stub class with no business logic ### Pass criteria - [ ] Plugin functionality is unaffected - [ ] mokojoomtos.php contains only the stub class
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoJoomTOS#101