Project

General

Profile

Actions

Bug #75273

closed

Composer install of TER extensions fails when conflicts array is empty

Added by Peter Kraume about 8 years ago. Updated over 5 years ago.

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

100%

Estimated time:
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.

Actions #1

Updated by Sascha Egerer about 8 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

Actions #2

Updated by Peter Kraume about 8 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!

Actions #3

Updated by Christian Opitz about 8 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

Actions #4

Updated by Christian Opitz about 8 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)?

Actions #5

Updated by Gerrit Code Review about 8 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

Actions #6

Updated by Christian Opitz about 8 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF