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_
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.
Table of content
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.
See also
To learn how to properly disable the deprecation log in production, see Disabling the deprecation log on production.
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
The debug preset also enables some other debug settings.
Note
These steps only enable/disable the FileWriter,
which comes with the TYPO3 default configuration. If you manually configured
additional writers for the TYPO3.
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:
<?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:
<?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.
Find calls to deprecated functions
The extension scanner 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_
. Using an IDE you can find all calls to the affected
methods.
The deprecations are also listed in the changelog 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:
/**
* @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.