Bug #78207

Composer requirement to package that is not type=typo3-cms-extension

Added by Felix Kopp over 2 years ago. Updated almost 2 years ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
composer
Target version:
-
Start date:
2016-10-09
Due date:
% Done:

0%

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

Description

Not sure wether this behaviour is a bug or a missing feature or mis-configuration on my side.
I could not find a hint in the 8.x changelog documentation by searching for "composer", "depend", "package".

Scenario:
In TYPO3 8.3.1 in extension manager. A extension of type "typo3-cms-extension" exists and is required and installed via composer as composer package. That extension itself brings a requirement to further composer packages not of type "typo3-cms-extension". When pressing button "activate". A Exception is thrown in 8.3.1 in Extension Manager:

Exception output
"#1382276561: The package "XXX" depends on "YYY" which is not present in the system. (More information)"

A demo package composer file could be

{
"name": "demo/demo",
"description": "demo",
"type": "typo3-cms-extension",
"license": "proprietary",
"version": "1.2.3",
"require": {
"spipu/html2pdf": "~4.5.1"
},
"replace": {
"demo_demo": "self.version",
"typo3-ter/demo_demo": "self.version"
}
}

The exception is only thrown in extension manager.
This exception is not thrown when the extension is activated via EXT: typo3_console.

History

#2 Updated by Mathias Schreiber over 2 years ago

I am pretty certain this is a bug.
I guess the EM treats composer.json files of an extension the same way as ext_emconf.php files, thus not resolving the dependencies outside of typo3conf/ext.

One question though.. you did not mention whether the dependency itself got installed, but since I guess you installed the extension via composer those dependencies were resolved correctly, right?

#3 Updated by Felix Kopp over 2 years ago

Yes, everything "below" typo3 / in composer went through without problems: Libraries are downloaded and auto-loaded within vendor directory.

Also the activation of the extension works just fine without exceptions when done via typo3_console.

Seems like the source for this problem lies within the EM.

#4 Updated by Riccardo De Contardi over 2 years ago

  • Category set to composer

#5 Updated by Nicole Cordes over 2 years ago

  • Status changed from New to Needs Feedback

Hi,

Can you please provide your ext_emconf.php please?

#6 Updated by Gerrit Code Review almost 2 years ago

  • Status changed from Needs Feedback to Under Review

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

#7 Updated by Helmut Hummel almost 2 years ago

To reproduce:

set up a require section in composer.json and remove contraints section in ext_emconf.php

#8 Updated by Helmut Hummel almost 2 years ago

  • TYPO3 Version changed from 8 to 7
  • PHP Version deleted (7.0)

#9 Updated by Helmut Hummel almost 2 years ago

  • Status changed from Under Review to Needs Feedback

Hm, ok, the fix isn't easy.

I would go for the advice that constriants section in ext_emconf.php is mandatory and maybe throw a better exception if it is not present, but composer.json requirements exist

Also available in: Atom PDF