[TASK] Deprecate RuntimeCacheWriter 26/57726/6
authorSusanne Moog <susanne.moog@typo3.org>
Mon, 30 Jul 2018 14:33:03 +0000 (16:33 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 31 Jul 2018 06:44:15 +0000 (08:44 +0200)
The RuntimeCacheWriter was introduced for the AdminPanel,
but the concept has flaws and there are better and cleaner
ways to achieve the wanted behavior. Therefore, the
RuntimeCacheWriter has been deprecated.

see https://review.typo3.org/56828/

Resolves: #85687
Related: #84894
Related: #84044
Releases: master
Change-Id: Ib794ddebb8cdf6e1738b81396fa12703a1538119
Reviewed-on: https://review.typo3.org/57726
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/Log/Writer/RuntimeCacheWriter.php
typo3/sysext/core/Documentation/Changelog/master/Deprecation-85687-DeprecateRuntimeCacheWriter.rst [new file with mode: 0644]
typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php

index 5ee36a3..363658a 100644 (file)
@@ -21,9 +21,17 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
  * Log writer that writes log entries into TYPO3 runtime cache
+ * @deprecated Deprecated since TYPO3 9, will be removed in v10
  */
 class RuntimeCacheWriter implements WriterInterface
 {
+    public function __construct()
+    {
+        trigger_error(
+            'RuntimeCacheWriter is deprecated, write your own custom InMemoryLogger instead.',
+            E_USER_DEPRECATED
+        );
+    }
 
     /**
      * Writes the log record to TYPO3s runtime cache
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-85687-DeprecateRuntimeCacheWriter.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-85687-DeprecateRuntimeCacheWriter.rst
new file mode 100644 (file)
index 0000000..4af5715
--- /dev/null
@@ -0,0 +1,38 @@
+.. include:: ../../Includes.txt
+
+==================================================
+Deprecation: #85687 - Deprecate RuntimeCacheWriter
+==================================================
+
+See :issue:`85687`
+
+Description
+===========
+
+The RuntimeCacheWriter was introduced in TYPO3 9.3 and misused the TYPO3 Caching Framework to provide InMemoryLogging
+for the (rework in progress) AdminPanel. Instead of having a generic LogWriter in the LoggingFramework this belongs
+scope-wise to the admin panel and implementation wise separated from the CachingFramework.
+
+The RuntimeCacheWriter has therefore been deprecated and the AdminPanel will use custom log writers on demand when
+they will become necessary.
+
+
+Impact
+======
+
+Calling RuntimeCacheWriter will throw a deprecation error.
+
+
+Affected Installations
+======================
+
+Any installation using the RuntimeCacheWriter.
+
+
+Migration
+=========
+
+Write your own CacheWriter (see `\TYPO3\CMS\Core\Log\Writer\WriterInterface`) or - if you need the exact same
+functionality - copy the old RuntimeCacheWriter to your own extension scope and use it.
+
+.. index:: PHP-API, FullyScanned, ext:adminpanel
index 7f7d4d5..348ed36 100644 (file)
@@ -694,4 +694,9 @@ return [
             'Deprecation-85124-RedirectingUrlHandlerHookConcept.rst',
         ],
     ],
+    'TYPO3\CMS\Core\Log\Writer\RuntimeCacheWriter' => [
+        'restFiles' => [
+            'Deprecation-85687-DeprecateRuntimeCacheWriter.rst',
+        ],
+    ],
 ];