List cms-package-dir as no longer being used property
On the composer.json page we have a list of proprties no longer being used and an explanation: https://docs.typo3.org/m/typo3/reference-coreapi/11.5/en-us/ExtensionArchitecture/FileStructure/ComposerJson.html#properties-no-longer-used
I think it would be good to list cms-package-dir, note when it was removed (version of composer installers and version of TYPO3 core) and link to information.
I noticed a lot of examples and extensions still use it, e.g. page on usetypo3 "Good practices in TYPO3 projects" which is tagged v8, v9, v10, though cms-package-dir is obsolete.
It is not a huge problem, but it clutters up the examples.
I would at least like to be able to (easily) find out in which TYPO3 version it was removed (which is currently not the case)
- was removed in typo3/cms-composer-installers 2.0 (?)
- this corresponds to TYPO3 version v9 (where subtree split was performed, moving from typo/cms)
Dependency on typo3/cms-composer-installers in main TYPO3 repo composer.json:
| TYPO3 version | typo3/cms-composer-installers |
|---|---|
| v11 | `^2.0 |
| v10 | `^2.0 |
| v9 | `^2.0 |
| v8.7.32 | ^1.2.8 |
Reason is: how Composer is handled has changed a lot and keeps changing, there are a number of examples out there, a lot of them outdated. If you still have an extension with this option, it might be nice to find information about this in an official place.
Also, there is no changelog on this. There is a changelog for adding the feature, but not for removing it.
Initially used as
"extra": {
"typo3/cms": {
"cms-package-dir": "{$vendor-dir}/typo3/cms",
Info
- changelog: https://docs.typo3.org/c/typo3/cms-core/11.5/en-us/Changelog/7.4/Feature-68184-PathsToTypo3cmsPackageAndDocumentRootCanBeSpecifiedInComposerjson.html
- Example where cms-package-dir is still used (for TYPO3 7 and 8): https://usetypo3.com/typo3-and-composer.html
- issue in typo3/cms-composer-installers elaborating on the topic: https://github.com/TYPO3/CmsComposerInstallers/issues/75
typo3/cms-composer-installers commits:
$this->io->writeError('<warning>Config option "cms-package-dir" has not been set or set to a value different from "{$vendor-dir}/typo3/cms".</warning>');
$this->io->writeError(' <warning>This option will be removed without substitution with typo3/cms-composer-installers 2.0.</warning>');
$this->io->writeError(' <warning>With 2.0 the typo3/cms package will always be installed in the vendor directory.</warning>');
$this->io->writeError('<warning>To get rid of this warning, use the following command to set the option to a not deprecated value:</warning>');
$this->io->writeError(' <info>composer config extra.typo3/cms.cms-package-dir \'{$vendor-dir}/typo3/cms\'</info>');
Some extensions which still contain the property in v11 versions:
calendarize/composer.json: "cms-package-dir": "{$vendor-dir}/typo3/cms",
calendarize_news/composer.json: "cms-package-dir": "{$vendor-dir}/typo3/cms",
calendarize_pages/composer.json: "cms-package-dir": "{$vendor-dir}/typo3/cms",
gotobackend/composer.json: "cms-package-dir": "{$vendor-dir}/typo3/cms",
powermail/composer.json: "cms-package-dir": "{$vendor-dir}/typo3/cms",
cms-package-dir is indeed outdated since long time.
I found it only in TYPO3 v7.4 and v8, but in v9 it was already removed.
Based on TYPO3\CMS\Composer\Installer\CoreInstaller it seems to me that it was related to the also outdated composer package typo3/cms.
To make it more detailed: the following code is included in the CoreInstaller:
self::$deprecationShown = true;
$this->io->writeError('<warning>Config option "cms-package-dir" has not been set or set to a value different from "{$vendor-dir}/typo3/cms".</warning>');
$this->io->writeError(' <warning>This option will be removed without substitution with typo3/cms-composer-installers 2.0.</warning>');
$this->io->writeError(' <warning>With 2.0 the typo3/cms package will always be installed in the vendor directory.</warning>');
$this->io->writeError(' <warning>To get rid of this warning, use the following command to set the option to a not deprecated value:</warning>');
$this->io->writeError(' <info>composer config extra.typo3/cms.cms-package-dir \'{$vendor-dir}/typo3/cms\'</info>');