Bug #57825
closedConfiguration option for defining loading order of extensions
100%
Description
It would be nice to have an additional configuration option in ext_emconf.php which allows to define the loading order of extensions, without defining a dependence.
Currently it is only possible to influence the loading order by defining dependencies:
'constraints' => array(
'depends' => array(
'typo3' => '6.2.0-6.2.999',
'php' => '5.2.0-5.4.999',
'realurl' => '1.12.0-1.12.999',
),
),
This is not suitable for my situation, because my extension does not require realurl. But in case realurl is installed, my extension must be loaded after realurl to hook into realurl correctly. My extension also works together with other extensions (cooluri, dbal, ..) but it also works without all of those.
It would be nice, if I could define which extensions (if already installed) should be loaded before and which should be loaded after my extension.
Thank you for your attention.
Updated by Markus Klein over 10 years ago
- Status changed from New to Accepted
We're thinking about a solution
Updated by Markus Klein over 10 years ago
Possible solution would be to use the "suggests" array in the emconf to announce such optional "dependencies".
In your case you would add realurl to the suggests constraints.
In case a suggested extension is depending on the suggesting one, the dependencies take precedence for the loading order.
Updated by Markus Klein over 10 years ago
Well it was tmaroschik's idea while we discussed this. I just posted it. ;-)
Updated by Markus Klein over 10 years ago
Ok this is more and more a real problem. rtehtmlarea needs to be loaded after setup extension in order to add the rte settings to the user settings. This is not a dependency and not really a suggestion. We could misuse "suggests" for this, but it does not really seem right to me. :-(
Updated by Gerrit Code Review over 10 years ago
- Status changed from Accepted 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/30005
Updated by Gerrit Code Review over 10 years ago
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/30006
Updated by Gerrit Code Review over 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30005
Updated by Gerrit Code Review over 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30006
Updated by Gerrit Code Review over 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30005
Updated by Gerrit Code Review over 10 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30005
Updated by Gerrit Code Review over 10 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30005
Updated by Stanislas Rolland over 10 years ago
Is it not strange to use the "suggest" option for this? Don't we need new options like "before" and/or "after"?
Updated by Stanislas Rolland over 10 years ago
If you unsinstall both setup and rtehtmlarea, and then install rtehtmlarea, without first installing setup, the extension manager does not even care about suggesting to install setup first...
Updated by Markus Klein over 10 years ago
suggest does not mean that EM should "force" you to install an extension.
I understand it more as a listing of what the author thinks is a good addition to his extension.
Updated by Stanislas Rolland over 10 years ago
Markus Klein wrote:
suggest does not mean that EM should "force" you to install an extension.
I understand it more as a listing of what the author thinks is a good addition to his extension.
My understanding is that the extension manager should "suggest" to install it, and I think it used to do so.
Updated by Markus Klein over 10 years ago
Ok, but with a checkbox in front to have it optional.
Still the question remains, can we introduce a before/after condition.
Updated by Stanislas Rolland over 10 years ago
In fact, the extension being installed could be a pre-requisite to some of its "suggested" extensions.
Updated by Markus Klein over 10 years ago
Stanislas: Have a look at the unit tests please.
This is the reason why dependencies take precedence over suggestions.
So if a "suggested" extension depends on the ext being installed (directly or indirectly), the suggestion is not taken into account for loading order calculation.
Updated by Fabien Udriot over 10 years ago
Can we say in this regard that "suggest" would be a soft dependency? In case the suggested extension is installed, the "suggest" becomes a "require" for the Package Manager which will compute the correct order of extensions accordingly. This is how I understand it...
Updated by Markus Klein over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d8b4aae080242573039ad6034c3ac5d8f01e1239.