Project

General

Profile

Actions

Bug #57825

closed

Configuration option for defining loading order of extensions

Added by Hendrik Becker about 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
System/Bootstrap/Configuration
Target version:
-
Start date:
2014-04-11
Due date:
% Done:

100%

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

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.


Related issues 4 (0 open4 closed)

Related to TYPO3 Core - Bug #58694: rtehtmlarea user settings are not shown in setup extClosedMarkus Klein2014-05-11

Actions
Related to TYPO3 Core - Task #58701: Package metadata should include "suggest" informationClosedMarkus Klein2014-05-11

Actions
Related to TYPO3 Core - Bug #51069: Updating extension changes load orderClosedMarkus Klein2013-08-14

Actions
Related to TYPO3 Core - Bug #67200: TCA Overrides has wrong extension orderClosed2015-05-29

Actions
Actions #1

Updated by Markus Klein about 10 years ago

  • Status changed from New to Accepted

We're thinking about a solution

Actions #2

Updated by Markus Klein about 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.

Actions #3

Updated by Christian Kuhn about 10 years ago

+1 for Markus idea.

Actions #4

Updated by Markus Klein about 10 years ago

Well it was tmaroschik's idea while we discussed this. I just posted it. ;-)

Actions #5

Updated by Markus Klein almost 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. :-(

Actions #6

Updated by Markus Klein almost 10 years ago

I'm working on a first draft.

Actions #7

Updated by Gerrit Code Review almost 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

Actions #8

Updated by Gerrit Code Review almost 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

Actions #9

Updated by Markus Klein almost 10 years ago

Can be tested with #58694.

Actions #10

Updated by Gerrit Code Review almost 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

Actions #11

Updated by Gerrit Code Review almost 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

Actions #12

Updated by Gerrit Code Review almost 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

Actions #13

Updated by Gerrit Code Review almost 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

Actions #14

Updated by Gerrit Code Review almost 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

Actions #15

Updated by Stanislas Rolland almost 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"?

Actions #16

Updated by Stanislas Rolland almost 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...

Actions #17

Updated by Markus Klein almost 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.

Actions #18

Updated by Stanislas Rolland almost 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.

Actions #19

Updated by Markus Klein almost 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.

Actions #20

Updated by Stanislas Rolland almost 10 years ago

In fact, the extension being installed could be a pre-requisite to some of its "suggested" extensions.

Actions #21

Updated by Markus Klein almost 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.

Actions #22

Updated by Fabien Udriot almost 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...

Actions #23

Updated by Markus Klein almost 10 years ago

Yes that's how this should be.

Actions #24

Updated by Markus Klein almost 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #25

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF