Project

General

Profile

Actions

Bug #83236

closed

composer status throws an exception, if _md5_values_when_last_written is not set in ext_emconf.php

Added by Peter Benke over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
composer
Target version:
-
Start date:
2017-12-06
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hello together,

"composer status" throws an exception, if there exists an extension, which has an ext_emconf.php without "_md5_values_when_last_written"-index.

composer status -v

[ErrorException]                                
Undefined index: _md5_values_when_last_written

Exception trace:
 () at **********/vendor/typo3/cms-composer-installers/src/Installer/Downloader/T3xDownloader.php:79
 Composer\Util\ErrorHandler::handle() at **********/vendor/typo3/cms-composer-installers/src/Installer/Downloader/T3xDownloader.php:79
 TYPO3\CMS\Composer\Installer\Downloader\T3xDownloader->getLocalChanges() at phar:///usr/local/bin/composer/src/Composer/Command/StatusCommand.php:92
 Composer\Command\StatusCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:259
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:847
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:192
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:231
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:123
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:104
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:43
 require() at /usr/local/bin/composer:24

File:
vendor/typo3/cms-composer-installers/src/Installer/Downloader/T3xDownloader.php
Line: 79

Thank you.

Actions #1

Updated by Helmut Hummel over 6 years ago

  • Status changed from New to Needs Feedback

I cannot reproduce this. Can you specify which extension it is that triggers this exception.

The code you reference is only executed when downloading a t3x package (typically from composer.typo3.org), but in this process _md5_values_when_last_written
key is added to ext_emconf.php.

Bottom line:
If you install an extension from any other source _md5_values_when_last_written is not checked.
If you install an extension from composer.typo3.org _md5_values_when_last_written is added

How do you get to a state, where _md5_values_when_last_written is not added or removed and then checked for?

Actions #2

Updated by Peter Benke over 6 years ago

Hi Helmut,

that is not true.
For example, I fetch the extension "be-secure-pw":

{
        "repositories": [
                { "type": "composer", "url": "https://composer.typo3.org/" },
                { "type": "vcs", "url": "https://github.com/TYPO3-extensions/gridelements" }
        ],
        "name": "typo3/cms-base-distribution",
        "description" : "TYPO3 CMS Base Distribution",
        "license": "GPL-2.0+",
        "config": {
                "github-oauth": {
                        "github.com": "***********************************************" 
                }
        },
        "require": {
                "typo3/cms": "8.7.8",
                "typo3-ter/be-secure-pw": "8.0.0",
                 ...

So I get the following ext_emconf.php:

<?php

/**
 * Extension Manager/Repository config file for ext "be_secure_pw".
 *
 * Manual updates:
 * Only the data in the array - everything else is removed by next
 * writing. "version" and "dependencies" must not be touched!
 */

$EM_CONF[$_EXTKEY] = [
    'title' => 'Make BE user password really secure',
    'description' => 'You can set password conventions to force secure passwords for BE users.',
    'category' => 'be',
    'shy' => 0,
    'version' => '8.0.0',
    'priority' => '',
    'loadOrder' => '',
    'module' => '',
    'state' => 'stable',
    'createDirs' => '',
    'modify_tables' => '',
    'author' => 'Thomas Loeffler',
    'author_email' => 'loeffler@spooner-web.de',
    'author_company' => '',
    'constraints' => [
        'depends' => [
            'php' => '7.0',
            'typo3' => '7.6.21-8.99.99',
        ],
        'conflicts' => [],
        'suggests' => [],
    ]
];

As you can see, there is no index "_md5_values_when_last_written".

Thank you.

Actions #3

Updated by Georg Ringer over 6 years ago

I can not reproduce that on 8 LTS , can you retry? thanks!

Actions #4

Updated by Peter Benke over 6 years ago

Hi,

you are right. I cannot reproduce this anymore, if I have a new and clean installation.
I suppose, this happened after the upgrade from 7 LTS (without composer) to 8 LTS (with composer).
The extension did not change and composer did not update the ext_emconf.php, which had no "_md5_values_when_last_written"-key...

Thank you.

Actions #5

Updated by Riccardo De Contardi over 6 years ago

@Peter Benke thank you for your quick feedback - do you think that this issue can be closed or is there something that should be done? Thanks .

Actions #6

Updated by Peter Benke over 6 years ago

This issue can be closed.
Thank you.

Actions #7

Updated by Helmut Hummel over 6 years ago

  • Status changed from Needs Feedback to Closed

thanks

Actions

Also available in: Atom PDF