File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -507,11 +507,12 @@ protected function rpcActionSave(): array
507507 $ publicExtensionDirectory = Environment::getExtensionsPath () . '/ ' . $ extension ->getExtensionKey ();
508508 $ usesComposerPath = $ this ->extensionService ->isComposerStoragePath ($ extensionDirectory );
509509 $ extensionExistedBefore = is_dir ($ extensionDirectory );
510+ $ isComposerInstallerV4 = $ this ->extensionService ->isComposerInstallerV4 ();
510511
511512 if (!$ extensionExistedBefore ) {
512513 GeneralUtility::mkdir ($ extensionDirectory );
513514 }
514- if ($ usesComposerPath && !is_link ($ publicExtensionDirectory )) {
515+ if ($ usesComposerPath && !$ isComposerInstallerV4 && ! is_link ($ publicExtensionDirectory )) {
515516 symlink (
516517 PathUtility::getRelativePath (dirname ($ publicExtensionDirectory ), $ extensionDirectory ),
517518 $ publicExtensionDirectory
@@ -616,7 +617,7 @@ protected function handleValidationWarnings(array $warnings): array
616617 $ messagesPerErrorCode = [];
617618 foreach ($ warnings as $ exception ) {
618619 $ errorCode = $ exception ->getCode ();
619- if (!is_array ($ messagesPerErrorCode [$ errorCode ])) {
620+ if (!isset ($ messagesPerErrorCode [$ errorCode ])) {
620621 $ messagesPerErrorCode [$ errorCode ] = [];
621622 }
622623 $ messagesPerErrorCode [$ errorCode ][] = nl2br (htmlspecialchars ($ exception ->getMessage ())) . ' (Error ' . $ errorCode . ')<br /><br /> ' ;
Original file line number Diff line number Diff line change 1818namespace EBT \ExtensionBuilder \Service ;
1919
2020use TYPO3 \CMS \Core \Core \Environment ;
21+ use TYPO3 \CMS \Core \Utility \GeneralUtility ;
2122use TYPO3 \CMS \Core \Utility \PathUtility ;
2223
2324class ExtensionService
@@ -94,4 +95,14 @@ public function isStoragePathConfigured(): bool
9495 {
9596 return !Environment::isComposerMode () || count ($ this ->resolveStoragePaths ()) > 0 ;
9697 }
98+
99+ /**
100+ * Returns, if typo3/cms-composer-installers v4 is used by checking, if /vendor/friendsoftypo3/extension-builder/
101+ * is part of the absolute install path of extension_builder
102+ */
103+ public function isComposerInstallerV4 (): bool
104+ {
105+ $ extensionPath = GeneralUtility::getFileAbsFileName ('EXT:extension_builder/ ' );
106+ return str_contains ($ extensionPath , '/vendor/friendsoftypo3/extension-builder/ ' );
107+ }
97108}
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ public function initialize(Extension $extension): void
139139
140140 if (file_exists ($ this ->previousExtensionDirectory . ExtensionBuilderConfigurationManager::EXTENSION_BUILDER_SETTINGS_FILE )) {
141141 $ extensionSchemaBuilder = GeneralUtility::makeInstance (ExtensionSchemaBuilder::class);
142- $ jsonConfig = $ this ->configurationManager ->getExtensionBuilderConfiguration ($ this ->previousExtensionKey );
142+ $ jsonConfig = $ this ->configurationManager ->getExtensionBuilderConfiguration ($ this ->previousExtensionKey , $ extension -> getStoragePath () );
143143 $ this ->previousExtension = $ extensionSchemaBuilder ->build ($ jsonConfig );
144144 $ previousDomainObjects = $ this ->previousExtension ->getDomainObjects ();
145145 /** @var DomainObject[] $previousDomainObjects */
You can’t perform that action at this time.
0 commit comments