From 052f44b37c094c4d8319d48b229dbe570f04c37e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BCrk?= Date: Sun, 9 Aug 2026 22:47:59 +0200 Subject: [PATCH] [TASK] Guard SchemaMigrator::install() with applySafe() TYPO3 v15 reworks the database analyzer stack and replaces the internal SchemaMigrator::install() with applySafe(). install() is deprecated in v15 and is removed there, while v14 only knows install(). Call applySafe() when the migrator provides it and keep install() as the fallback, so functional test databases are created on both core versions. The guard is a capability check and deliberately not a core version check: v15 nightlies and every v15 dev state predating the rework report v15 while still only having install(), so a version check would break them. --- Classes/Core/Testbase.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Classes/Core/Testbase.php b/Classes/Core/Testbase.php index 6316e94e..9fc1f898 100644 --- a/Classes/Core/Testbase.php +++ b/Classes/Core/Testbase.php @@ -919,6 +919,12 @@ public function createDatabaseStructure(ContainerInterface $container): void $sqlReader = GeneralUtility::makeInstance(SqlReader::class); $sqlCode = $sqlReader->getTablesDefinitionString(); $createTableStatements = $sqlReader->getCreateTableStatementArray($sqlCode); + // @todo: Remove the install() fallback when v14 compat is dropped, the + // method no longer exists in v15. + if (method_exists($schemaMigrationService, 'applySafe')) { + $schemaMigrationService->applySafe($createTableStatements); + return; + } $schemaMigrationService->install($createTableStatements); }