---
title: "Deprecation"
manual: "TYPO3 Explained"
version: "11.5"
permalink: "https://docs.typo3.org/permalink/t3coreapi:deprecation@11.5"
source: "ApiOverview/Deprecation/Index.rst"
rendered: "2026-10-21T15:30:00+00:00"
---

> [!WARNING]
> **Attention**
>
> TYPO3 v11 has reached end-of-life as of October 31th 2024 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 v11 here:
> [TYPO3 ELTS](https://typo3.com/services/extended-support-elts).

# Deprecation {#deprecation}

-   [Introduction](https://docs.typo3.org/permalink/t3coreapi:introduction@11.5)
-   [Enabling deprecation errors](https://docs.typo3.org/permalink/t3coreapi:enabling-deprecation-errors@11.5)
-   [Find calls to deprecated functions](https://docs.typo3.org/permalink/t3coreapi:find-calls-to-deprecated-functions@11.5)
-   [Deprecate functions in extensions](https://docs.typo3.org/permalink/t3coreapi:deprecate-functions-in-extensions@11.5)

## Introduction {#deprecation-introduction}

Calls to deprecated functions are logged to track usage of deprecated/outdated
methods in the TYPO3 Core. Developers have to make sure to adjust their code to
avoid using this old functionality since deprecated methods will be removed in
future TYPO3 releases.

Deprecations use the PHP method `trigger_error('a message', E_USER_DEPRECATED)`
and run through the logging and exception stack of the TYPO3 Core. There are
several methods that help extension developers in dispatching deprecation
errors. In the development context, deprecations are turned into exceptions by
default and ignored in the production context.

> [!NOTE]
> For information how to handle deprecations in the TYPO3 Core,
> see the Contribution Guide: [How to deprecate classes, methods, arguments and hooks in the TYPO3 Core](https://docs.typo3.org/m/typo3/guide-contributionworkflow/main/en-us/Appendix/HowToDeprecateThings.html#deprecations).

<a id="deprecation-disable-errors"></a>

## Enabling deprecation errors {#deprecation-enable-errors}

TYPO3 ships with a default configuration, in which deprecation logging is
**disabled**. If you upgrade to the latest TYPO3 version, you need to change
your development configuration to enable deprecation logging in case you need
it.

### Via GUI {#via-gui}

Enabling the deprecation log can be done in the
**Admin Tools > Settings** backend module. Click on
**Choose Preset** in the **Configuration Presets** pane, open
**Debug settings**, activate the **Debug** option and submit
with **Activate preset**. Disabling the deprecation log can be done by
selecting the **Live** preset instead.

![Enabling the debug preset](../../Images/ManualScreenshots/Backend/EnablingDebugPreset.png)

The debug preset enables also some other debug settings.

> [!NOTE]
> These steps only enable/disable the [FileWriter](https://docs.typo3.org/permalink/t3coreapi:logging-writers-filewriter@11.5),
> which comes with the TYPO3 default configuration. If you manually configured
> **additional** writers for the `TYPO3.CMS.deprecations` logger, you need to
> manually remove them to completely disable deprecation logging.

### Via configuration file directly {#via-configuration-file-directly}

Instead of using the GUI you can also enable
or disable the deprecation log with the `disabled` option:

**Excerpt of typo3conf/LocalConfiguration.php**

```php
<?php

return [
    // ... some configuration
    'LOG' => [
        'TYPO3' => [
            'CMS' => [
                'deprecations' => [
                    'writerConfiguration' => [
                        'notice' => [
                            'TYPO3\CMS\Core\Log\Writer\FileWriter' => [
                                'disabled' => false,
                            ],
                        ],
                    ],
                ],
            ],
        ],
    ],
    // ... more configuration
];

```

Deprecation logging can also be enabled in the `additional.php`
configuration file, here with safeguarding to only enable it in
development context:

**typo3conf/AdditionalConfiguration.php**

```php
<?php

use Psr\Log\LogLevel;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Log\Writer\FileWriter;

if (Environment::getContext()->isDevelopment()) {
    $GLOBALS['TYPO3_CONF_VARS']['LOG']['TYPO3']['CMS']['deprecations']
    ['writerConfiguration'][LogLevel::NOTICE][FileWriter::class]
    ['disabled'] = false;
}

```

For more information on how to configure the writing of deprecation logs see
[Writer configuration](https://docs.typo3.org/permalink/t3coreapi:logging-configuration-writer@11.5).

## Find calls to deprecated functions {#deprecation-finding-calls}

The [extension scanner](https://docs.typo3.org/permalink/t3coreapi:extension-scanner@11.5) provides an interactive
interface to scan extension code for usage of removed or deprecated TYPO3 Core
API.

It is also possible to do a file search for `@deprecated` and
`E_USER_DEPRECATED`. Using an IDE you can find all calls to the affected
methods.

The deprecations are also listed in the [changelog](https://docs.typo3.org/c/typo3/cms-core/main/en-us/Index.html) of the
corresponding TYPO3 version.

## Deprecate functions in extensions {#deprecate-functions}

Methods that will be removed in future versions of your extension should be
marked as deprecated by both the doc comment and a call to the PHP error method:

**Excerpt of EXT:my_extension/Classes/MyClass.php**

```php
/**
 * @deprecated since version 3.0.4, will be removed in version 4.0.0
 */
public function decreaseColPosCountByRecord(array $record, int $dec = 1): int
{
    trigger_error(
        'Method "decreaseColPosCountByRecord" is deprecated since version 3.0.4, will be removed in version 4.0.0',
        E_USER_DEPRECATED
    );

    // ... more logic
}
```

For more information about how to deprecate classes, arguments and hooks and how
the TYPO3 Core handles deprecations, see [How to deprecate classes, methods, arguments and hooks in the TYPO3 Core](https://docs.typo3.org/m/typo3/guide-contributionworkflow/main/en-us/Appendix/HowToDeprecateThings.html#deprecations).
