refactor: Divi-Boot-Schritte in DiviIntegration::boot() (Bootable) – Upgrader-Hook, Prüf-Route, CLI und Reiter „Divi“ über lit_mcp_admin_tabs; IntegrationRegistry::boot() bootet jede Integration genau einmal; Prüfseiten-Aufräumen im load-Hook statt beim Rendern
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
06148fb8c1
commit
6c59934caa
+3
-15
@@ -12,7 +12,6 @@ use LIT\MCP\Admin\ConnectionRepository;
|
||||
use LIT\MCP\Admin\ConnectionStatus;
|
||||
use LIT\MCP\Admin\ConnectionTab;
|
||||
use LIT\MCP\Admin\ConnectionUsage;
|
||||
use LIT\MCP\Admin\DiviTab;
|
||||
use LIT\MCP\Admin\LimitsTab;
|
||||
use LIT\MCP\Admin\LogTab;
|
||||
use LIT\MCP\Admin\SettingsPage;
|
||||
@@ -21,15 +20,11 @@ use LIT\MCP\Admin\ToolsTab;
|
||||
use LIT\MCP\ChangeLog\ChangeLog;
|
||||
use LIT\MCP\ChangeLog\ChangeLogCleanup;
|
||||
use LIT\MCP\ChangeLog\ChangeLogInstaller;
|
||||
use LIT\MCP\Cli\DiviCheckCommand;
|
||||
use LIT\MCP\Guides\InstructionsBuilder;
|
||||
use LIT\MCP\Integrations\Core\CoreIntegration;
|
||||
use LIT\MCP\Integrations\Divi\DiviIntegration;
|
||||
use LIT\MCP\Integrations\Divi\Library\LibraryAccess;
|
||||
use LIT\MCP\Integrations\Divi\Release\CompatibilityCheck;
|
||||
use LIT\MCP\Integrations\Divi\Release\DiviCheckRoute;
|
||||
use LIT\MCP\Integrations\Divi\Release\DiviToolGate;
|
||||
use LIT\MCP\Integrations\Divi\Release\ReleaseResolver;
|
||||
use LIT\MCP\Integrations\Divi\ThemeBuilder\ThemeBuilderAccess;
|
||||
use LIT\MCP\Integrations\IntegrationRegistry;
|
||||
use LIT\MCP\Integrations\Media\MediaIntegration;
|
||||
@@ -78,11 +73,6 @@ final class Plugin
|
||||
(new ChangeLogInstaller($changeLog))->maybeInstall();
|
||||
(new ChangeLogCleanup($changeLog, $limits))->register();
|
||||
|
||||
// Spec §5.4: a theme update checks the Divi fingerprints again at once (the state key would, too).
|
||||
add_action('upgrader_process_complete', static function (): void {
|
||||
delete_transient(ReleaseResolver::CACHE);
|
||||
});
|
||||
|
||||
$schema = self::contentSchema();
|
||||
$registry = null;
|
||||
$policy = null;
|
||||
@@ -139,10 +129,9 @@ final class Plugin
|
||||
$divi->themeBuilder()
|
||||
);
|
||||
|
||||
// Spec §6: the admin check runs as a REST request (same context as MCP calls).
|
||||
$diviCheck = static fn (): CompatibilityCheck => CompatibilityCheck::create($divi->contentComposer());
|
||||
(new DiviCheckRoute($diviCheck))->register();
|
||||
DiviCheckCommand::register($diviCheck);
|
||||
// Integration-owned hooks (Divi: upgrader hook, check route, CLI command, tab "Divi") – before the settings
|
||||
// page reads its tabs.
|
||||
$registry->boot();
|
||||
|
||||
$policy = ExposurePolicy::fromOption()->withGroups($registry->groupMap(...));
|
||||
(new AbilityRegistrar(
|
||||
@@ -167,7 +156,6 @@ final class Plugin
|
||||
new ToolsTab($registry, $policy),
|
||||
new LogTab($changeLog, $limits, $registry),
|
||||
new LimitsTab(),
|
||||
new DiviTab(log: $changeLog),
|
||||
];
|
||||
self::$settingsPage = new SettingsPage(
|
||||
$tabs,
|
||||
|
||||
Reference in New Issue
Block a user