From 881980e5a62be996ee1c00c0bb6425b8fda933b7 Mon Sep 17 00:00:00 2001 From: Benn Oshrin Date: Sat, 16 Aug 2025 19:26:27 -0400 Subject: [PATCH] Address initial population of Plugin Registry (CFM-462) --- app/src/Command/DatabaseCommand.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/Command/DatabaseCommand.php b/app/src/Command/DatabaseCommand.php index 84eb84c20..ea20bc9e8 100644 --- a/app/src/Command/DatabaseCommand.php +++ b/app/src/Command/DatabaseCommand.php @@ -82,6 +82,12 @@ public function execute(Arguments $args, ConsoleIo $io) { // want to skip this with -n since most of the time the database won't be empty. $Plugins = TableRegistry::getTableLocator()->get('Plugins'); + // If we're dealing with a brand new installation, the Plugin Registry will be empty, + // and even core Plugins won't be returned here, so we need to sync it here. (This will + // also handle the case of upgrading when a new core Plugin is introduced.) + + $Plugins->syncPluginRegistry(); + // AR-Plugin-6 Only apply schemas from active plugins $activePlugins = $Plugins->find('active')->all();