Bug #75273

Composer install of TER extensions fails when conflicts array is empty

Added by Peter Kraume almost 4 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
composer
Target version:
-
Start date:
2016-03-25
Due date:
% Done:

100%

TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

I tried to install dd_googlesitemap via composer:
composer -v require typo3-ter/dd-googlesitemap:~2.0.6

This fails with this error message:

Installation failed, reverting ./composer.json to its original content.

  [ErrorException]
  Undefined index: conflicts

Exception trace:
 () at /.../vendor/typo3/cms-composer-installers/Classes/TYPO3/CMS/Composer/Installer/Downloader/T3xDownloader.php:327
 Composer\Util\ErrorHandler::handle() at /.../vendor/typo3/cms-composer-installers/Classes/TYPO3/CMS/Composer/Installer/Downloader/T3xDownloader.php:327
 TYPO3\CMS\Composer\Installer\Downloader\T3xDownloader->fixEmConf() at /.../vendor/typo3/cms-composer-installers/Classes/TYPO3/CMS/Composer/Installer/Downloader/T3xDownloader.php:264
 TYPO3\CMS\Composer\Installer\Downloader\T3xDownloader->constructEmConf() at /.../vendor/typo3/cms-composer-installers/Classes/TYPO3/CMS/Composer/Installer/Downloader/T3xDownloader.php:249
 TYPO3\CMS\Composer\Installer\Downloader\T3xDownloader->writeEmConf() at /.../vendor/typo3/cms-composer-installers/Classes/TYPO3/CMS/Composer/Installer/Downloader/T3xDownloader.php:70
 TYPO3\CMS\Composer\Installer\Downloader\T3xDownloader->extract() at phar:///.../composer.phar/src/Composer/Downloader/ArchiveDownloader.php:43
 Composer\Downloader\ArchiveDownloader->download() at /.../vendor/typo3/cms-composer-installers/Classes/TYPO3/CMS/Composer/Installer/Downloader/T3xDownloader.php:50
 TYPO3\CMS\Composer\Installer\Downloader\T3xDownloader->download() at phar:///.../composer.phar/src/Composer/Downloader/DownloadManager.php:213
 Composer\Downloader\DownloadManager->download() at /.../vendor/typo3/cms-composer-installers/Classes/TYPO3/CMS/Composer/Installer/ExtensionInstaller.php:191
 TYPO3\CMS\Composer\Installer\ExtensionInstaller->installCode() at /.../vendor/typo3/cms-composer-installers/Classes/TYPO3/CMS/Composer/Installer/ExtensionInstaller.php:123
 TYPO3\CMS\Composer\Installer\ExtensionInstaller->install() at phar:///.../composer.phar/src/Composer/Installer/InstallationManager.php:152
 Composer\Installer\InstallationManager->install() at phar:///.../composer.phar/src/Composer/Installer/InstallationManager.php:139
 Composer\Installer\InstallationManager->execute() at phar:///.../composer.phar/src/Composer/Installer.php:569
 Composer\Installer->doInstall() at phar:///.../composer.phar/src/Composer/Installer.php:228
 Composer\Installer->run() at phar:///.../composer.phar/src/Composer/Command/RequireCommand.php:170
 Composer\Command\RequireCommand->execute() at phar:///.../composer.phar/vendor/symfony/console/Command/Command.php:259
 Symfony\Component\Console\Command\Command->run() at phar:///.../composer.phar/vendor/symfony/console/Application.php:844
 Symfony\Component\Console\Application->doRunCommand() at phar:///.../composer.phar/vendor/symfony/console/Application.php:192
 Symfony\Component\Console\Application->doRun() at phar:///.../composer.phar/src/Composer/Console/Application.php:166
 Composer\Console\Application->doRun() at phar:///.../composer.phar/vendor/symfony/console/Application.php:123
 Symfony\Component\Console\Application->run() at phar:///.../composer.phar/src/Composer/Console/Application.php:99
 Composer\Console\Application->run() at phar:///.../composer.phar/bin/composer:43
 require() at /.../composer.phar:25

The reason for this problem seems to be that there is an empty conflicts array in the ext_emconf.php provided with the extension. See https://github.com/dmitryd/typo3-dd_googlesitemap/blob/development/ext_emconf.php#L37 for details.

Upon commenting out line 327 in vendor/typo3/cms-composer-installers/Classes/TYPO3/CMS/Composer/Installer/Downloader/T3xDownloader.php the installation works.

I'm not sure if this is a core bug or if it's up to the extension developer to remove the empty array from ext_emconf.php.

Associated revisions

Revision d5d38323 (diff)
Added by Christian Opitz almost 4 years ago

[TASK] Loosen version constraint for TYPO3 CMS Composer Installers

The current version constraint doesn't allow composer to install
bug fix versions of the 1.1 version branch of the composer installers
which is unhandy when there are bug fixes such as for #75273.
The new constraint matches all 1.1.* versions greater 1.1.4

Resolves: #75273
Releases: 6.2
Change-Id: I81ce319ea812d44bcf3dd23602e876eb0f0675d8
Reviewed-on: https://review.typo3.org/47414
Reviewed-by: Mathias Brodala <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>
Reviewed-by: Morton Jonuschat <>
Tested-by: Morton Jonuschat <>

History

#1 Updated by Sascha Egerer almost 4 years ago

  • Status changed from New to Needs Feedback
  • Assignee set to Peter Kraume

This is not related to the TYPO3 core but to the composer install package.
The issue has been already fixed. Please check and close the ticker if it works.
https://github.com/TYPO3/CmsComposerInstallers/issues/44

#2 Updated by Peter Kraume almost 4 years ago

Using version 1.2.6 of Composer Installers fixes my problem:
https://github.com/TYPO3/CmsComposerInstallers/releases/tag/1.2.6

Update your installation with composer update (--dry-run).

@Sascha I don't have rights to close an issue here. Feel free to do so!

#3 Updated by Christian Opitz almost 4 years ago

This, indeed fixes the problem but the composer require constraint for the installers package is to tight, to allow composer to fetch the version that contains the fix. I'll add a change for that

#4 Updated by Christian Opitz almost 4 years ago

And, Sascha, as far as I can see, this only relates to 6.2 - 7 and 7.6 have more loose constraints, which should let composer update to the latest bug fix version - could you thus please change the TYPO3 version of this issue to 6(.2)?

#5 Updated by Gerrit Code Review almost 4 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47414

#6 Updated by Christian Opitz almost 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#7 Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF