From dda11e80e4295c09b95e6f2a58549552da88044a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BCrk?= Date: Fri, 16 Jan 2026 12:03:47 +0100 Subject: [PATCH] [TASK] Add theme extension development support for monorepository TYPO3 MonoRepository `typo3/sysext/*` system extension used the `typo3/cms-` prefix for the composer name and has been used to make package loading compatible for the monorepository development. To allow now the new `theme_camino` package not following this rule and using `typo3/theme-camino` as composer package name, we need to adjust respecting `typo3/theme-` as composer package name prefix. --- Classes/Composer/PackageInfo.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Classes/Composer/PackageInfo.php b/Classes/Composer/PackageInfo.php index 5ed341d8..8bd66636 100644 --- a/Classes/Composer/PackageInfo.php +++ b/Classes/Composer/PackageInfo.php @@ -110,9 +110,14 @@ public function getReplacesPackageNames(): array { $keys = array_keys($this->info['replace'] ?? []); if ($this->isMonoRepository()) { - // Monorepo root composer.json replaces core system extension. We do not want that happen, so - // ignore only replaced core extensions. - $keys = array_filter($keys, static fn($value) => !str_starts_with($value, 'typo3/cms-')); + // TYPO3 monorepo root package (composer.json) replaces `typo3/sysext/*` packages + // ending up with the root package composer information being used in composer + // `InstalledVersions` for the original package names. We need the correct package + // information and is the reason why we remove these replace package names to allow + // adding `typo3/sysext/*` packages in `ComposerPackageManager->processMonoRepository()`. + // Dropping is only made for extension package names starting with `typo3/cms-` or + // `typo3/theme-`. + $keys = array_filter($keys, static fn($value) => !(str_starts_with($value, 'typo3/cms-') || str_starts_with($value, 'typo3/theme-'))); } return $keys; }