Project

General

Profile

Actions

Bug #77177

closed

Extension composer.json not properly loaded when installing extension via typo3-ter/*

Added by Markus Kasten over 8 years ago. Updated about 7 years ago.

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

0%

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

Description

The composer.json of an extension is not read properly by composer, when an extension is installed via typo3-ter/extname. This causes problems when composer searches for class-alias-maps for example.

Example:

in project composer.json:

...
    "require": {
        "typo3-ter/solr": "^3.1.0",
        ...
    }
...

The solr extensions composer.json contains the following part, which should trigger the class alias map generation:

...
"extra": {
    ...
    "typo3/class-alias-loader": {
      "always-add-alias-loader": true,
      "class-alias-maps": [
        "Migrations/Code/ClassAliasMap.php" 
      ]
    }
  }
...

But the extra section is not read properly ($package->getExtra() is empty when debugging the class alias loader). This is probably because composer ignores extra when writing vendor/composer/installed.json.

When solr is installed via apache-solr-for-typo3/solr, the extra section is copied to composers installed.json and found by the class alias loader. I'm not sure if this is a bug with composer, or composer is just not designed to be used this way.

The same applies to compatibility6 and other extensions, that use class alias maps. Extensions containing a composer.json should probably not be available via the typo3-ter/ vendor name on composer.typo3.org.

Actions

Also available in: Atom PDF