[TASK] Introduce DeprecationUtility and move methods 59/46159/3
authorFrank Nägler <frank.naegler@typo3.org>
Fri, 22 Jan 2016 16:00:55 +0000 (17:00 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 22 Jan 2016 18:32:24 +0000 (19:32 +0100)
Resolves: #67269
Releases: master
Change-Id: I7e3279e0718d0f631f53c89e5a500e880bfb6ef9
Reviewed-on: https://review.typo3.org/46159
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
32 files changed:
typo3/sysext/backend/Classes/Form/FormDataProvider/DatabaseSystemLanguageRows.php
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaFlexPrepare.php
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/core/Classes/Imaging/IconFactory.php
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/core/Classes/Messaging/FlashMessage.php
typo3/sysext/core/Classes/Package/Package.php
typo3/sysext/core/Classes/Utility/DeprecationUtility.php [new file with mode: 0644]
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php
typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Documentation/Changelog/master/Deprecation-67269-IntroduceDeprecationUtilityAndMoveMethods.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/DeprecationUtilityTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/Fixtures/DeprecationUtilityFixture.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/Fixtures/GeneralUtilityFixture.php
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php
typo3/sysext/extbase/Classes/Utility/ExtensionUtility.php
typo3/sysext/fluid/Classes/View/StandaloneView.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/CshViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/IconViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/TableListViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/FlashMessagesViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlViewHelper.php
typo3/sysext/form/Classes/Domain/Builder/FormBuilder.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Page/PageGenerator.php
typo3/sysext/lang/Classes/LanguageService.php
typo3/sysext/reports/Classes/Report/Status/ConfigurationStatus.php
typo3/sysext/rtehtmlarea/Classes/Form/Element/RichTextElement.php

index 10f26d4..2aeaeaa 100644 (file)
@@ -19,6 +19,7 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Database\DatabaseConnection;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Messaging\FlashMessageService;
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Lang\LanguageService;
@@ -95,7 +96,7 @@ class DatabaseSystemLanguageRows implements FormDataProviderInterface
             if (!empty($dbRow['language_isocode'])) {
                 $languageRows[$uid]['iso'] = $dbRow['language_isocode'];
             } elseif ($isStaticInfoTablesLoaded && !empty($dbRow['static_lang_isocode'])) {
-                GeneralUtility::deprecationLog(
+                DeprecationUtility::logMessage(
                     'Usage of the field "static_lang_isocode" is discouraged, and will stop working with CMS 8. Use the built-in'
                     . ' language field "language_isocode" in your sys_language records.'
                 );
index 0d2f4f0..b323d73 100644 (file)
@@ -16,6 +16,7 @@ namespace TYPO3\CMS\Backend\Form\FormDataProvider;
 
 use TYPO3\CMS\Backend\Form\FormDataProviderInterface;
 use TYPO3\CMS\Core\Migrations\TcaMigration;
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -175,7 +176,7 @@ class TcaFlexPrepare implements FormDataProviderInterface
                         $context = 'FormEngine did an on-the-fly migration of a flex form data structure. This is deprecated and will be removed.'
                             . ' Merge the following changes into the flex form definition of table "' . $table . '"" in field "' . $fieldName . '"":';
                         array_unshift($messages, $context);
-                        GeneralUtility::deprecationLog(implode(LF, $messages));
+                        DeprecationUtility::logMessage(implode(LF, $messages));
                     }
                     $newSubStructure[$subKey] = $migratedTca['dummyTable']['columns']['dummyField'];
                 }
index ac18b09..70f32a2 100644 (file)
@@ -21,6 +21,7 @@ use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Page\PageRenderer;
 use TYPO3\CMS\Core\Service\MarkerBasedTemplateService;
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
@@ -726,7 +727,7 @@ function jumpToUrl(URL) {
      */
     public function section($label, $text, $nostrtoupper = false, $sH = false, $type = 0, $allowHTMLinHeader = false)
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         $str = '';
         // Setting header
         if ($label) {
@@ -753,7 +754,7 @@ function jumpToUrl(URL) {
      */
     public function divider($dist)
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         $dist = (int)$dist;
         $str = '
 
@@ -775,7 +776,7 @@ function jumpToUrl(URL) {
      */
     public function sectionHeader($label, $sH = false, $addAttrib = '')
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         $tag = $sH ? 'h2' : 'h3';
         if ($addAttrib && $addAttrib[0] !== ' ') {
             $addAttrib = ' ' . $addAttrib;
@@ -798,7 +799,7 @@ function jumpToUrl(URL) {
      */
     public function sectionBegin()
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         if (!$this->sectionFlag) {
             $this->sectionFlag = 1;
             $str = '
@@ -825,7 +826,7 @@ function jumpToUrl(URL) {
     public function sectionEnd()
     {
         if ($this->sectionFlag) {
-            GeneralUtility::logDeprecatedFunction();
+            DeprecationUtility::logFunction();
             $this->sectionFlag = 0;
             return '
        </div>
@@ -1053,7 +1054,7 @@ function jumpToUrl(URL) {
      */
     public function wrapInCData($string)
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         $string = '/*<![CDATA[*/' . $string . '/*]]>*/';
         return $string;
     }
@@ -1098,7 +1099,7 @@ function jumpToUrl(URL) {
      */
     public function funcMenu($content, $menu)
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         return '
                        <table border="0" cellpadding="0" cellspacing="0" width="100%" id="typo3-funcmenu">
                                <tr>
@@ -1142,7 +1143,7 @@ function jumpToUrl(URL) {
      */
     public function getDragDropCode($table, $additionalJavaScriptCode = '')
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/LegacyTree', 'function() {
                        DragDrop.table = "' . $table . '";
                        ' . $additionalJavaScriptCode . '
@@ -1166,7 +1167,7 @@ function jumpToUrl(URL) {
      */
     public function getTabMenu($mainParams, $elementName, $currentValue, $menuItems, $script = '', $addparams = '')
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         $content = '';
         if (is_array($menuItems)) {
             if (!is_array($mainParams)) {
@@ -1228,7 +1229,7 @@ function jumpToUrl(URL) {
      */
     public function getVersionSelector($id, $noAction = false)
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         if (
                 ExtensionManagementUtility::isLoaded('version') &&
                 !ExtensionManagementUtility::isLoaded('workspaces')
index 4a4cd16..44cb0e2 100755 (executable)
@@ -31,6 +31,7 @@ use TYPO3\CMS\Core\Resource\ProcessedFile;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
 use TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\HttpUtility;
@@ -235,7 +236,7 @@ class BackendUtility
      */
     public static function getSQLselectableList($in_list, $tablename, $default_tablename)
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         $list = array();
         if ((string)trim($in_list) != '') {
             $tempItemArray = explode(',', trim($in_list));
@@ -1353,7 +1354,7 @@ class BackendUtility
      */
     public static function titleAltAttrib($content)
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         $out = '';
         $out .= ' alt="' . htmlspecialchars($content) . '"';
         $out .= ' title="' . htmlspecialchars($content) . '"';
@@ -2370,7 +2371,7 @@ class BackendUtility
      */
     public static function makeConfigForm($configArray, $defaults, $dataPrefix)
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         $params = $defaults;
         $lines = array();
         if (is_array($configArray)) {
@@ -4177,7 +4178,7 @@ class BackendUtility
      */
     public static function processParams($params)
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         $paramArr = array();
         $lines = explode(LF, $params);
         foreach ($lines as $val) {
index b3db61f..7d961fa 100644 (file)
@@ -21,6 +21,7 @@ use TYPO3\CMS\Core\Resource\FolderInterface;
 use TYPO3\CMS\Core\Resource\InaccessibleFolder;
 use TYPO3\CMS\Core\Resource\ResourceInterface;
 use TYPO3\CMS\Core\Type\Icon\IconState;
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Versioning\VersionState;
 use TYPO3\CMS\Extbase\SignalSlot\Dispatcher;
@@ -100,7 +101,7 @@ class IconFactory
     {
         if ($this->iconRegistry->isDeprecated($identifier)) {
             $deprecationSettings = $this->iconRegistry->getDeprecationSettings($identifier);
-            GeneralUtility::deprecationLog(sprintf($deprecationSettings['message'], $identifier));
+            DeprecationUtility::logMessage(sprintf($deprecationSettings['message'], $identifier));
             if (!empty($deprecationSettings['replacement'])) {
                 $identifier = $deprecationSettings['replacement'];
             }
index 03d3bd5..b43f7e6 100644 (file)
@@ -18,6 +18,7 @@ use TYPO3\CMS\Core\Exception;
 use TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider;
 use TYPO3\CMS\Core\Imaging\IconProvider\FontawesomeIconProvider;
 use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\StringUtility;
 
@@ -2745,7 +2746,7 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface
         }
         if ($this->isDeprecated($identifier)) {
             $deprecationSettings = $this->getDeprecationSettings($identifier);
-            GeneralUtility::deprecationLog(sprintf($deprecationSettings['message'], $identifier));
+            DeprecationUtility::logMessage(sprintf($deprecationSettings['message'], $identifier));
             if (!empty($deprecationSettings['replacement'])) {
                 $identifier = $deprecationSettings['replacement'];
             }
index 5dcaf20..d972be9 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Core\Messaging;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -115,7 +116,7 @@ class FlashMessage extends AbstractMessage
      */
     public function render()
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         $title = '';
         if (!empty($this->title)) {
             $title = '<h4 class="alert-title">' . $this->title . '</h4>';
index c19645b..ebb66e1 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Core\Package;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -207,7 +208,7 @@ class Package implements PackageInterface
                     // dynamically migrate 'cms' dependency to 'core' dependency
                     // see also \TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility::convertDependenciesToObjects
                     if ($packageKey === 'cms') {
-                        GeneralUtility::deprecationLog('Extension "' . $this->packageKey . '" defines a dependency on ext:cms, which has been removed. Please remove the dependency.');
+                        DeprecationUtility::logMessage('Extension "' . $this->packageKey . '" defines a dependency on ext:cms, which has been removed. Please remove the dependency.');
                         $packageKey = 'core';
                     }
                     $constraint = new MetaData\PackageConstraint(MetaData::CONSTRAINT_TYPE_DEPENDS, $packageKey);
diff --git a/typo3/sysext/core/Classes/Utility/DeprecationUtility.php b/typo3/sysext/core/Classes/Utility/DeprecationUtility.php
new file mode 100644 (file)
index 0000000..87fc537
--- /dev/null
@@ -0,0 +1,103 @@
+<?php
+namespace TYPO3\CMS\Core\Utility;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Class DeprecationUtility
+ */
+class DeprecationUtility
+{
+
+    /**
+     * Gets the absolute path to the deprecation log file.
+     *
+     * @return string Absolute path to the deprecation log file
+     */
+    public static function getDeprecationLogFileName()
+    {
+        return PATH_typo3conf . 'deprecation_' . GeneralUtility::shortMD5(
+            (PATH_site . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])
+        ) . '.log';
+    }
+
+    /**
+     * Writes a message to the deprecation log.
+     *
+     * @param string $msg Message (in English).
+     * @return void
+     */
+    public static function logMessage($msg)
+    {
+        if (!$GLOBALS['TYPO3_CONF_VARS']['SYS']['enableDeprecationLog']) {
+            return;
+        }
+        // Legacy values (no strict comparison, $log can be boolean, string or int)
+        $log = $GLOBALS['TYPO3_CONF_VARS']['SYS']['enableDeprecationLog'];
+        if ($log === true || $log == '1') {
+            $log = array('file');
+        } else {
+            $log = GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['SYS']['enableDeprecationLog'], true);
+        }
+        $date = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' '
+            . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'] . ': ');
+        if (in_array('file', $log) !== false) {
+            // Write a longer message to the deprecation log
+            $destination = static::getDeprecationLogFileName();
+            $file = @fopen($destination, 'a');
+            if ($file) {
+                @fwrite($file, ($date . $msg . LF));
+                @fclose($file);
+                GeneralUtility::fixPermissions($destination);
+            }
+        }
+        if (in_array('devlog', $log) !== false) {
+            // Copy message also to the developer log
+            GeneralUtility::devLog($msg, 'Core', GeneralUtility::SYSLOG_SEVERITY_WARNING);
+        }
+        // Do not use console in login screen
+        if (in_array('console', $log) !== false && isset($GLOBALS['BE_USER']->user['uid'])) {
+            DebugUtility::debug($msg, $date, 'Deprecation Log');
+        }
+    }
+
+    /**
+     * Logs a call to a deprecated function.
+     * The log message will be taken from the annotation.
+     *
+     * @return void
+     */
+    public static function logFunction()
+    {
+        if (!$GLOBALS['TYPO3_CONF_VARS']['SYS']['enableDeprecationLog']) {
+            return;
+        }
+        $trail = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
+        if ($trail[1]['type']) {
+            $function = new \ReflectionMethod($trail[1]['class'], $trail[1]['function']);
+        } else {
+            $function = new \ReflectionFunction($trail[1]['function']);
+        }
+        $msg = '';
+        if (preg_match('/@deprecated\\s+(.*)/', $function->getDocComment(), $match)) {
+            $msg = $match[1];
+        }
+        // Write a longer message to the deprecation log: <function> <annotion> - <trace> (<source>)
+        $logMsg = $trail[1]['class'] . $trail[1]['type'] . $trail[1]['function'];
+        $logMsg .= '() - ' . $msg . ' - ' . DebugUtility::debugTrail();
+        $logMsg .= ' (' . PathUtility::stripPathSitePrefix($function->getFileName())
+            . '#' . $function->getStartLine() . ')';
+        self::logMessage($logMsg);
+    }
+}
index 1e9aa09..e3d0aa4 100644 (file)
@@ -1767,7 +1767,7 @@ tt_content.' . $key . $suffix . ' {
                 . ' will be removed. The backend module "Configuration -> TCA" shows the modified values.'
                 . ' Please adapt these areas:';
             array_unshift($messages, $context);
-            GeneralUtility::deprecationLog(implode(LF, $messages));
+            DeprecationUtility::logMessage(implode(LF, $messages));
         }
 
         static::emitTcaIsBeingBuiltSignal($GLOBALS['TCA']);
index 52477f0..df25440 100644 (file)
@@ -36,6 +36,7 @@ use TYPO3\CMS\Core\Resource\Folder;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
 use TYPO3\CMS\Core\Resource\ResourceStorage;
 use TYPO3\CMS\Core\Type\Exception\InvalidEnumerationValueException;
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Lang\LanguageService;
 
@@ -315,7 +316,7 @@ class ExtendedFileUtility extends BasicFileUtility
      */
     public function pushErrorMessagesToFlashMessageQueue()
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         foreach ($this->getErrorMessages() as $msg) {
             $flashMessage = GeneralUtility::makeInstance(
                 FlashMessage::class,
index e77a5ee..0ddaf9c 100755 (executable)
@@ -4627,48 +4627,24 @@ class GeneralUtility
      *
      * @param string $msg Message (in English).
      * @return void
+     * @deprecated since TYPO3 CMS 8, will be removed in TYPO3 CMS 9
      */
     public static function deprecationLog($msg)
     {
-        if (!$GLOBALS['TYPO3_CONF_VARS']['SYS']['enableDeprecationLog']) {
-            return;
-        }
-        // Legacy values (no strict comparison, $log can be boolean, string or int)
-        $log = $GLOBALS['TYPO3_CONF_VARS']['SYS']['enableDeprecationLog'];
-        if ($log === true || $log == '1') {
-            $log = array('file');
-        } else {
-            $log = self::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['SYS']['enableDeprecationLog'], true);
-        }
-        $date = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'] . ': ');
-        if (in_array('file', $log) !== false) {
-            // Write a longer message to the deprecation log
-            $destination = static::getDeprecationLogFileName();
-            $file = @fopen($destination, 'a');
-            if ($file) {
-                @fwrite($file, ($date . $msg . LF));
-                @fclose($file);
-                self::fixPermissions($destination);
-            }
-        }
-        if (in_array('devlog', $log) !== false) {
-            // Copy message also to the developer log
-            self::devLog($msg, 'Core', self::SYSLOG_SEVERITY_WARNING);
-        }
-        // Do not use console in login screen
-        if (in_array('console', $log) !== false && isset($GLOBALS['BE_USER']->user['uid'])) {
-            DebugUtility::debug($msg, $date, 'Deprecation Log');
-        }
+        DeprecationUtility::logFunction();
+        DeprecationUtility::logMessage($msg);
     }
 
     /**
      * Gets the absolute path to the deprecation log file.
      *
      * @return string Absolute path to the deprecation log file
+     * @deprecated since TYPO3 CMS 8, will be removed in TYPO3 CMS 9
      */
     public static function getDeprecationLogFileName()
     {
-        return PATH_typo3conf . 'deprecation_' . self::shortMD5((PATH_site . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) . '.log';
+        DeprecationUtility::logFunction();
+        DeprecationUtility::getDeprecationLogFileName();
     }
 
     /**
@@ -4676,27 +4652,11 @@ class GeneralUtility
      * The log message will be taken from the annotation.
      *
      * @return void
+     * @deprecated since TYPO3 CMS 8, will be removed in TYPO3 CMS 9
      */
     public static function logDeprecatedFunction()
     {
-        if (!$GLOBALS['TYPO3_CONF_VARS']['SYS']['enableDeprecationLog']) {
-            return;
-        }
-        $trail = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
-        if ($trail[1]['type']) {
-            $function = new \ReflectionMethod($trail[1]['class'], $trail[1]['function']);
-        } else {
-            $function = new \ReflectionFunction($trail[1]['function']);
-        }
-        $msg = '';
-        if (preg_match('/@deprecated\\s+(.*)/', $function->getDocComment(), $match)) {
-            $msg = $match[1];
-        }
-            // Write a longer message to the deprecation log: <function> <annotion> - <trace> (<source>)
-        $logMsg = $trail[1]['class'] . $trail[1]['type'] . $trail[1]['function'];
-        $logMsg .= '() - ' . $msg . ' - ' . DebugUtility::debugTrail();
-        $logMsg .= ' (' . PathUtility::stripPathSitePrefix($function->getFileName()) . '#' . $function->getStartLine() . ')';
-        self::deprecationLog($logMsg);
+        DeprecationUtility::logFunction();
     }
 
     /**
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-67269-IntroduceDeprecationUtilityAndMoveMethods.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-67269-IntroduceDeprecationUtilityAndMoveMethods.rst
new file mode 100644 (file)
index 0000000..512b6c4
--- /dev/null
@@ -0,0 +1,34 @@
+===================================================================
+Deprecation: #67269 - Introduce DeprecationUtility and move methods
+===================================================================
+
+Description
+===========
+
+The following methods have been marked as deprecated and moved into DeprecationUtility
+
+* ``GeneralUtility::deprecationLog``
+* ``GeneralUtility::logDeprecatedFunction``
+* ``GeneralUtility::getDeprecationLogFileName``
+
+
+Impact
+======
+
+Calling this method directly will trigger a deprecation log entry.
+
+
+Affected Installations
+======================
+
+Any TYPO3 instance using this methods.
+
+
+Migration
+=========
+
+Use one of the following methods:
+
+* ``DeprecationUtility::logMessage``
+* ``DeprecationUtility::logFunction``
+* ``DeprecationUtility::getDeprecationLogFileName``
diff --git a/typo3/sysext/core/Tests/Unit/Utility/DeprecationUtilityTest.php b/typo3/sysext/core/Tests/Unit/Utility/DeprecationUtilityTest.php
new file mode 100644 (file)
index 0000000..2a12261
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+namespace TYPO3\CMS\Core\Tests\Unit\Utility;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Core\Tests\Unit\Utility\Fixtures\DeprecationUtilityFixture;
+
+/**
+ * Testcase for class \TYPO3\CMS\Core\Utility\DeprecationUtility
+ */
+class DeprecationUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
+{
+    /**
+     * @test
+     */
+    public function deprecationLogFixesPermissionsOnLogFile()
+    {
+        if (TYPO3_OS === 'WIN') {
+            $this->markTestSkipped('deprecationLogFixesPermissionsOnLogFile() test not available on Windows.');
+        }
+        $filePath = PATH_site . DeprecationUtilityFixture::DEPRECATION_LOG_PATH;
+        @mkdir(dirname($filePath));
+        $this->testFilesToDelete[] = $filePath;
+        $GLOBALS['TYPO3_CONF_VARS']['SYS']['enableDeprecationLog'] = true;
+        $GLOBALS['TYPO3_CONF_VARS']['SYS']['fileCreateMask'] = '0777';
+        DeprecationUtilityFixture::logMessage('foo');
+        clearstatcache();
+        $resultFilePermissions = substr(decoct(fileperms($filePath)), 2);
+        $this->assertEquals('0777', $resultFilePermissions);
+    }
+}
diff --git a/typo3/sysext/core/Tests/Unit/Utility/Fixtures/DeprecationUtilityFixture.php b/typo3/sysext/core/Tests/Unit/Utility/Fixtures/DeprecationUtilityFixture.php
new file mode 100644 (file)
index 0000000..a74047c
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+namespace TYPO3\CMS\Core\Tests\Unit\Utility\Fixtures;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
+
+/**
+ * Class GeneralUtilityFixture
+ */
+class DeprecationUtilityFixture extends DeprecationUtility
+{
+    const DEPRECATION_LOG_PATH = 'typo3temp/test_deprecation/test.log';
+
+
+    /**
+     * Gets the absolute path to the deprecation log file.
+     *
+     * @return string Absolute path to the deprecation log file
+     */
+    public static function getDeprecationLogFileName()
+    {
+        return PATH_site . static::DEPRECATION_LOG_PATH;
+    }
+}
index 54f6181..7648efc 100644 (file)
@@ -21,8 +21,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  */
 class GeneralUtilityFixture extends GeneralUtility
 {
-    const DEPRECATION_LOG_PATH = 'typo3temp/test_deprecation/test.log';
-
     /**
      * @var int
      */
@@ -82,16 +80,6 @@ class GeneralUtilityFixture extends GeneralUtility
     }
 
     /**
-     * Gets the absolute path to the deprecation log file.
-     *
-     * @return string Absolute path to the deprecation log file
-     */
-    public static function getDeprecationLogFileName()
-    {
-        return PATH_site . static::DEPRECATION_LOG_PATH;
-    }
-
-    /**
      * Resets the internal computed class name cache.
      */
     public static function resetFinalClassNameCache()
index ca4cacd..9598dbf 100644 (file)
@@ -4324,25 +4324,6 @@ class GeneralUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $this->assertEquals('0777', substr(decoct(fileperms($testLogFilename)), 2));
     }
 
-    /**
-     * @test
-     */
-    public function deprecationLogFixesPermissionsOnLogFile()
-    {
-        if (TYPO3_OS === 'WIN') {
-            $this->markTestSkipped('deprecationLogFixesPermissionsOnLogFile() test not available on Windows.');
-        }
-        $filePath = PATH_site . GeneralUtilityFixture::DEPRECATION_LOG_PATH;
-        @mkdir(dirname($filePath));
-        $this->testFilesToDelete[] = $filePath;
-        $GLOBALS['TYPO3_CONF_VARS']['SYS']['enableDeprecationLog'] = true;
-        $GLOBALS['TYPO3_CONF_VARS']['SYS']['fileCreateMask'] = '0777';
-        GeneralUtilityFixture::deprecationLog('foo');
-        clearstatcache();
-        $resultFilePermissions = substr(decoct(fileperms($filePath)), 2);
-        $this->assertEquals('0777', $resultFilePermissions);
-    }
-
     ///////////////////////////////////////////////////
     // Tests concerning callUserFunction
     ///////////////////////////////////////////////////
index c818326..fd5b2b9 100644 (file)
@@ -237,7 +237,7 @@ tt_content.' . $pluginSignature . ' {
     protected static function checkVendorNameFormat($vendorName, $extensionName)
     {
         if (preg_match('/^[A-Z]/', $vendorName) !== 1) {
-            \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('The vendor name from tx_' . $extensionName . ' must begin with a capital letter.');
+            \TYPO3\CMS\Core\Utility\DeprecationUtility::logMessage('The vendor name from tx_' . $extensionName . ' must begin with a capital letter.');
         }
     }
 
index 10cea29..ab22d17 100644 (file)
@@ -21,6 +21,7 @@ namespace TYPO3\CMS\Fluid\View;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 use TYPO3\CMS\Core\Cache\CacheManager;
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
 use TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext;
@@ -234,7 +235,7 @@ class StandaloneView extends AbstractTemplateView
      */
     public function setLayoutRootPath($layoutRootPath)
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         $this->setLayoutRootPaths(array($layoutRootPath));
     }
 
@@ -260,7 +261,7 @@ class StandaloneView extends AbstractTemplateView
      */
     public function getLayoutRootPath()
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         $layoutRootPaths = $this->getLayoutRootPaths();
         return array_shift($layoutRootPaths);
     }
@@ -295,7 +296,7 @@ class StandaloneView extends AbstractTemplateView
      */
     public function setPartialRootPath($partialRootPath)
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         $this->setPartialRootPaths(array($partialRootPath));
     }
 
@@ -309,7 +310,7 @@ class StandaloneView extends AbstractTemplateView
      */
     public function getPartialRootPath()
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         $partialRootPaths = $this->getPartialRootPaths();
         return array_shift($partialRootPaths);
     }
index 19c9440..005cbeb 100644 (file)
@@ -63,12 +63,12 @@ class CshViewHelper extends AbstractBackendViewHelper implements CompilableInter
     public function render($table = null, $field = '', $iconOnly = false, $styleAttributes = '')
     {
         if ($iconOnly) {
-            \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
+            \TYPO3\CMS\Core\Utility\DeprecationUtility::logMessage(
                 'The option iconOnly has no effect anymore and can be removed without problems. The parameter will be removed in TYPO3 CMS 8.'
             );
         }
         if ($styleAttributes) {
-            \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
+            \TYPO3\CMS\Core\Utility\DeprecationUtility::logMessage(
                 'The option styleAttributes has no effect anymore and can be removed without problems. The parameter will be removed in TYPO3 CMS 8.'
             );
         }
index b415c56..b7eed37 100644 (file)
@@ -23,6 +23,7 @@ namespace TYPO3\CMS\Fluid\ViewHelpers\Be\Buttons;
 
 use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
@@ -92,7 +93,7 @@ class IconViewHelper extends AbstractBackendViewHelper implements CompilableInte
      */
     public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         $uri = $arguments['uri'];
         $icon = $arguments['icon'];
         $title = $arguments['title'];
index c989b15..a7d560a 100644 (file)
@@ -74,7 +74,7 @@ class TableListViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBacken
     public function render($tableName, array $fieldList = array(), $storagePid = null, $levels = 0, $filter = '', $recordsPerPage = 0, $sortField = '', $sortDescending = false, $readOnly = false, $enableClickMenu = true, $clickTitleMode = null, $alternateBackgroundColors = false)
     {
         if ($alternateBackgroundColors) {
-            \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
+            \TYPO3\CMS\Core\Utility\DeprecationUtility::logMessage(
                 'The option alternateBackgroundColors has no effect anymore and can be removed without problems. The parameter will be removed in TYPO3 CMS 8.'
             );
         }
index 406347a..b0d2d8c 100644 (file)
@@ -20,6 +20,7 @@ namespace TYPO3\CMS\Fluid\ViewHelpers;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -124,7 +125,7 @@ class FlashMessagesViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractT
             return '';
         }
         if ($renderMode !== null) {
-            GeneralUtility::deprecationLog('renderMode has been deprecated in TYPO3 CMS 7.3 and will be removed in TYPO3 CMS 8');
+            DeprecationUtility::logMessage('renderMode has been deprecated in TYPO3 CMS 7.3 and will be removed in TYPO3 CMS 8');
             if ($renderMode === self::RENDER_MODE_DIV) {
                 $content = $this->renderDiv($flashMessages);
             } else {
index 7e8203f..d67aea1 100644 (file)
@@ -22,6 +22,7 @@ namespace TYPO3\CMS\Fluid\ViewHelpers\Form;
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Reflection\ObjectAccess;
 
@@ -152,7 +153,7 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper
     protected function getValue($convertObjects = true)
     {
         $value = null;
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
 
         if ($this->hasArgument('value')) {
             $value = $this->arguments['value'];
index 77b0b24..1cae282 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Fluid\ViewHelpers\Format;
  * Public License for more details.                                       *
  *                                                                        */
 
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
@@ -95,7 +96,7 @@ class HtmlViewHelper extends AbstractViewHelper implements CompilableInterface
     {
         $parseFuncTSPath = $arguments['parseFuncTSPath'];
         if (TYPO3_MODE === 'BE') {
-            GeneralUtility::deprecationLog('The usage of the viewhelper "f:format.html" in the backend context is discouraged, and will stop working with CMS 9. '
+            DeprecationUtility::logMessage('The usage of the viewhelper "f:format.html" in the backend context is discouraged, and will stop working with CMS 9. '
                     . 'Use the viewhelper "f:format.raw" instead.');
             self::simulateFrontendEnvironment();
         }
index 1e3e1da..9711b89 100644 (file)
@@ -15,6 +15,7 @@ namespace TYPO3\CMS\Form\Domain\Builder;
  */
 
 use TYPO3\CMS\Core\TypoScript\TemplateService;
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Form\Domain\Model\Configuration;
 use TYPO3\CMS\Form\Domain\Model\Element;
@@ -254,7 +255,7 @@ class FormBuilder
         // @todo Check $userConfiguredElementTypoScript
 
         if ($elementType === 'IMAGEBUTTON') {
-            GeneralUtility::deprecationLog('EXT:form: The element IMAGEBUTTON is deprecated since TYPO3 CMS 7, will be removed with TYPO3 CMS 8.');
+            DeprecationUtility::logMessage('EXT:form: The element IMAGEBUTTON is deprecated since TYPO3 CMS 7, will be removed with TYPO3 CMS 8.');
         }
 
         $element->setElementType($elementType);
index 98bdea5..cc4851c 100644 (file)
@@ -33,6 +33,7 @@ use TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser;
 use TYPO3\CMS\Core\TypoScript\TemplateService;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Core\Utility\DebugUtility;
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\HttpUtility;
@@ -6727,7 +6728,7 @@ class ContentObjectRenderer
      */
     public function processParams($params)
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         $paramArr = array();
         $lines = GeneralUtility::trimExplode(LF, $params, true);
         foreach ($lines as $val) {
index 7880d77..f94fb63 100644 (file)
@@ -32,6 +32,7 @@ use TYPO3\CMS\Core\Service\DependencyOrderingService;
 use TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser;
 use TYPO3\CMS\Core\TypoScript\TemplateService;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\HttpUtility;
@@ -3923,7 +3924,7 @@ class TypoScriptFrontendController
     {
         $explanationText = $explanation !== '' ? ' - ' . $explanation : '';
         $this->getTimeTracker()->setTSlogMessage($typoScriptProperty . ' is deprecated.' . $explanationText, 2);
-        GeneralUtility::deprecationLog('TypoScript ' . $typoScriptProperty . ' is deprecated' . $explanationText);
+        DeprecationUtility::logMessage('TypoScript ' . $typoScriptProperty . ' is deprecated' . $explanationText);
     }
 
     /**
index 2330b4b..d85339c 100644 (file)
@@ -18,6 +18,7 @@ use TYPO3\CMS\Core\Page\PageRenderer;
 use TYPO3\CMS\Core\TimeTracker\TimeTracker;
 use TYPO3\CMS\Core\Type\File\ImageInfo;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
 use TYPO3\CMS\Core\Utility\PathUtility;
@@ -547,7 +548,7 @@ class PageGenerator
             if (!is_array($tsfe->pSetup['includeJSlibs.'])) {
                 $tsfe->pSetup['includeJSlibs.'] = array();
             } else {
-                GeneralUtility::deprecationLog('The property page.includeJSlibs is marked for deprecation and will be removed in TYPO3 CMS 8. Please use page.includeJSLibs (with an uppercase L) instead.');
+                DeprecationUtility::logMessage('The property page.includeJSlibs is marked for deprecation and will be removed in TYPO3 CMS 8. Please use page.includeJSLibs (with an uppercase L) instead.');
             }
             if (!is_array($tsfe->pSetup['includeJSLibs.'])) {
                 $tsfe->pSetup['includeJSLibs.'] = array();
index a1ce077..65d2aff 100755 (executable)
@@ -18,6 +18,7 @@ use TYPO3\CMS\Core\Charset\CharsetConverter;
 use TYPO3\CMS\Core\Localization\Locales;
 use TYPO3\CMS\Core\Localization\LocalizationFactory;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -178,7 +179,7 @@ class LanguageService
      */
     public function makeEntities($str)
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         // Convert string back again, but using the full entity conversion:
         return $this->csConvObj->utf8_to_entities($str);
     }
@@ -431,7 +432,7 @@ class LanguageService
      */
     public function overrideLL($index, $value, $overrideDefault = true)
     {
-        GeneralUtility::logDeprecatedFunction();
+        DeprecationUtility::logFunction();
         if (!isset($GLOBALS['LOCAL_LANG'])) {
             $GLOBALS['LOCAL_LANG'] = array();
         }
index bb39753..3793c81 100644 (file)
@@ -19,6 +19,7 @@ use TYPO3\CMS\Core\Database\DatabaseConnection;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Messaging\FlashMessageService;
 use TYPO3\CMS\Core\Registry;
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\PathUtility;
 use TYPO3\CMS\Lang\LanguageService;
@@ -195,7 +196,7 @@ class ConfigurationStatus implements StatusProviderInterface
             $value = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:enabled');
             $message = '<p>' . $this->getLanguageService()->getLL('status_configuration_DeprecationLogEnabled') . '</p>';
             $severity = ReportStatus::NOTICE;
-            $logFile = GeneralUtility::getDeprecationLogFileName();
+            $logFile = DeprecationUtility::getDeprecationLogFileName();
             $logFileSize = 0;
             if (@file_exists($logFile)) {
                 $logFileSize = filesize($logFile);
@@ -257,7 +258,7 @@ class ConfigurationStatus implements StatusProviderInterface
      */
     protected function getDeprecationLogFileLink()
     {
-        $logFile = GeneralUtility::getDeprecationLogFileName();
+        $logFile = DeprecationUtility::getDeprecationLogFileName();
         $relativePath = GeneralUtility::resolveBackPath($this->backPath . PathUtility::stripPathSitePrefix($logFile));
         $link = '<a href="' . $relativePath . '">' . $logFile . '</a>';
         return $link;
@@ -290,7 +291,7 @@ class ConfigurationStatus implements StatusProviderInterface
      */
     protected static function removeDeprecationLogFile()
     {
-        if (@unlink(GeneralUtility::getDeprecationLogFileName())) {
+        if (@unlink(DeprecationUtility::getDeprecationLogFileName())) {
             $message = $GLOBALS['LANG']->getLL('status_configuration_DeprecationLogDeletedSuccessful');
             $severity = FlashMessage::OK;
         } else {
index c58ada8..b8edddf 100644 (file)
@@ -25,6 +25,7 @@ use TYPO3\CMS\Core\Localization\Locales;
 use TYPO3\CMS\Core\Localization\LocalizationFactory;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Core\Utility\ClientUtility;
+use TYPO3\CMS\Core\Utility\DeprecationUtility;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Lang\LanguageService;
@@ -1232,7 +1233,7 @@ class RichTextElement extends AbstractFormElement
                 $version,
                 $this->data['databaseRow']['pid']
             );
-            GeneralUtility::deprecationLog($message);
+            DeprecationUtility::logMessage($message);
             if ($this->processedRteConfiguration['logDeprecatedProperties.']['logAlsoToBELog']) {
                 $message = sprintf(
                     $this->getLanguageService()->sL('LLL:EXT:rtehtmlarea/Resources/Private/Language/locallang.xlf:deprecatedPropertyMessage'),