---
title: "Deprecation handling: logging, marking and finding deprecations"
manual: "TYPO3 Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3coreapi:deprecation@main"
source: "ApiOverview/Deprecation/Index.rst"
modified: "2026-09-16T13:05:25+00:00"
---

# Deprecation handling: logging, marking and finding deprecations

TYPO3 logs calls to deprecated functions to help developers identify and update
outdated code. Deprecated methods will be removed in future TYPO3 versions, so
they should be avoided.

Deprecations are triggered by `trigger_error()` and pass through TYPO3’s
logging and exception system. In development, they are shown as exceptions by
default; in production, they are typically ignored.

> [!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).

**Table of content**

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

## Enabling the deprecation log

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

> [!NOTE]
> **See also**
>
> To learn how to properly disable the deprecation log in production, see
> [Disabling the deprecation log on production](https://docs.typo3.org/permalink/t3coreapi:deprecation-disable-errors@main).

### Via GUI

Enabling the deprecation log can be done in the
**System > 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/DebugSettings/DebugSettings.png)

The debug preset also enables some other debug settings.

> [!NOTE]
> These steps only enable/disable the [FileWriter](https://docs.typo3.org/permalink/t3coreapi:logging-writers-filewriter@main),
> 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

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

**Excerpt of config/system/settings.php | typo3conf/system/settings.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/Typo3ConfVars/Index.md#file-project-config-system-additional-php)
configuration file, here with safeguarding to only enable it in
development context:

**config/system/additional.php | typo3conf/system/additional.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@main).

## Find calls to deprecated functions

The [extension scanner](https://docs.typo3.org/permalink/t3coreapi:extension-scanner@main) 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

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).
