Skip to content

Commit 6c0f81e

Browse files
committed
[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.
1 parent 6052b4a commit 6c0f81e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Classes/Composer/PackageInfo.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,14 @@ public function getReplacesPackageNames(): array
110110
{
111111
$keys = array_keys($this->info['replace'] ?? []);
112112
if ($this->isMonoRepository()) {
113-
// Monorepo root composer.json replaces core system extension. We do not want that happen, so
114-
// ignore only replaced core extensions.
115-
$keys = array_filter($keys, static fn($value) => !str_starts_with($value, 'typo3/cms-'));
113+
// TYPO3 monorepo root package (composer.json) replaces `typo3/sysext/*` packages
114+
// ending up with the root package composer information being used in composer
115+
// `InstalledVersions` for the original package names. We need the correct package
116+
// information and is the reason why we remove these replace package names to allow
117+
// adding `typo3/sysext/*` packages in `ComposerPackageManager->processMonoRepository()`.
118+
// Dropping is only made for extension package names starting with `typo3/cms-` or
119+
// `typo3/theme-`.
120+
$keys = array_filter($keys, static fn($value) => !(str_starts_with($value, 'typo3/cms-') || str_starts_with($value, 'typo3/theme-')));
116121
}
117122
return $keys;
118123
}

0 commit comments

Comments
 (0)