---
title: "Extension loading order"
manual: "TYPO3 Explained"
version: "12.4"
permalink: "https://docs.typo3.org/permalink/t3coreapi:extension-loading-order@12.4"
source: "ExtensionArchitecture/BestPractises/ExtensionLoadingOrder.rst"
rendered: "2026-10-21T15:29:37+00:00"
---

> [!WARNING]
> **Attention**
>
> TYPO3 v12 has reached end-of-life as of April 30th 2026 and
> is no longer being maintained. Use the version switcher on the top
> left of this page to select documentation for a supported version of TYPO3.
>
> Need more time before upgrading?
> You can purchase Extended Long Term Support (ELTS) for TYPO3 v12 here:
> [TYPO3 ELTS](https://typo3.com/services/extended-support-elts).

# Extension loading order {#extension-loading-order}

In TYPO3, the order in which extensions are loaded can impact system behavior.
This is especially important when an extension overrides, extends, or modifies
the functionality of another. TYPO3 initializes extensions in a defined order,
and if dependencies are not loaded beforehand, it can lead to unintended
behavior.

## Composer-based installations: Loading order via composer.json {#extension-loading-order-composer}

In Composer-based installations, extensions and dependencies are
installed based on the configuration in the
[`composer.json`](../FileStructure/ComposerJson.md#file-extension-composer-json) file.

For example, if an extension relies on or modifies functionality provided by
the `ext:felogin` system extension, the dependency should be defined
as follows:

**Excerpt of EXT:my_extension/composer.json**

```json
"require": {
    "typo3/cms-felogin": "^12.4 || ^13.4"
}

```

This ensures that TYPO3 loads the extension **after** the
`ext:felogin` system extension.

Instead of `require`, extensions can also use the `suggest` section.
Suggested extensions, if installed, are loaded **before** the current one —
just like required ones — but without being mandatory.

A typical use case is suggesting an extension that provides optional widgets,
such as for EXT:dashboard.

## Classic mode installations: Loading order via ext_emconf.php {#extension-loading-order-classic}

In Classic mode installations, extensions are loaded based on the order defined in the
[`ext_emconf.php`](../FileStructure/ExtEmconf.md#file-extension-ext-emconf-php) file.

For example, if an extension relies on or modifies functionality provided by
the `ext:felogin` system extension, the dependency should be defined
as follows:

**EXT:my_extension/ext_emconf.php**

```json
<?php

$EM_CONF[$_EXTKEY] = [
    'title' => 'Extension extending ext:felogin',
    'state' => 'stable',
    'version' => '1.0.0',
    'constraints' => [
        'depends' => [
            'felogin' => '12.4.0-13.4.99',
        ],
        'conflicts' => [],
        'suggests' => [],
    ],
];

```

This ensures that TYPO3 loads the extension **after** the
`ext:felogin` system extension.

As with Composer, you can use the `suggest` section instead of `depends`.
Suggested extensions, if installed, are loaded **before** the current one,
without being strictly required.

## Keeping the loading order in sync between Composer-based and Classic mode installations {#extension-loading-order-composer-and-classic}

If your extension supports both Composer-based and classic TYPO3 installations,
you should keep dependency information consistent between the
[`composer.json`](../FileStructure/ComposerJson.md#file-extension-composer-json) and
[ext_emconf.php](https://docs.typo3.org/permalink/t3coreapi:ext-emconf-php@12.4) files.

This is especially important for managing dependency constraints such as
`depends`, `conflicts`, and `suggests`. Use the equivalent fields in
[`composer.json`](../FileStructure/ComposerJson.md#file-extension-composer-json) — `require`, `conflict`, and
`suggest` — to ensure consistent loading behavior across both installation types.
