Bug #78207
closedComposer requirement to package that is not type=typo3-cms-extension
0%
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.
Updated by Felix Kopp about 8 years ago
Follow the composer.json specs from http://insight.helhum.io/post/148886148725/composerjson-specification-for-typo3-extensions as well.
Updated by Mathias Schreiber about 8 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?
Updated by Felix Kopp about 8 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.
Updated by Nicole Cordes over 7 years ago
- Status changed from New to Needs Feedback
Hi,
Can you please provide your ext_emconf.php please?
Updated by Gerrit Code Review over 7 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
Updated by Helmut Hummel over 7 years ago
To reproduce:
set up a require section in composer.json and remove contraints section in ext_emconf.php
Updated by Helmut Hummel over 7 years ago
- TYPO3 Version changed from 8 to 7
- PHP Version deleted (
7.0)
Updated by Helmut Hummel over 7 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
Updated by Susanne Moog over 4 years ago
- Status changed from Needs Feedback to Closed
As proposed in the last comment, I did a PR for the documentation here https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-CoreApi/pull/812 - note: in general, the dependency section of an em_conf should at this point never be empty, not only because of the comments here, but also because TER etc. require those settings.