Open PKuhlmay opened 8 months ago
in the template for the ext_emconf we've this code:
'depends' => [<f:for each="{extension.dependencies}" as="version" key="extensionKey">
'{extensionKey}' => '{version}',</f:for>
],
which is quite straight forward, but clarifies that in EBT\ExtensionBuilder\Service\FileGenerator every dependency has to be assigned with extensionKey and version constraints in the old way, for testing and demo like this:
$dependencies = $this->extension->getDependencies();
if (!array_key_exists('extbase', $dependencies)) {
$dependencies['extbase'] = '12.4.0-12.4.99';
}
$this->extension->setDependencies($dependencies);
$this->generateComposerJson();
The Composer file is created with ignoring all dependencies, the core is just statically assigned.
So actually we need a larger array for the dependencies like:
$dependencies = [];
$dependencies[$extensionKey] = [
'composerName' => 'typo3/cms-extbase',
'composerConstraint' => '^12.4',
'extensionKey' => $extensionKey,
'legacyConstraint' => '12.4.0-12.4.99'
];
This has to be reflected in the GUI too for assigning any dependencies.
As typo3/cms-extbase could be a non-default in the future, the created extensions should include this as a dependency, as these use extbase. If typo3/cms-extbase is not required anymore, this could lead to some problems.