[TASK] Deprecate TypoScriptFrontendController->page_cache_reg1 23/55723/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Wed, 14 Feb 2018 23:38:46 +0000 (00:38 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 16 Feb 2018 16:50:01 +0000 (17:50 +0100)
Property page_cache_reg1 is a poor man limited way to manipulate
page cache tagging. It has been of very little use and is
deprecated now.

The usage in indexed_search (which always only added the default "0"
to database) is dropped along the way.

Change-Id: I9ea129fc6d20adb7a35a719f3d9d630aa663952f
Resolves: #83905
Releases: master
Reviewed-on: https://review.typo3.org/55723
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Documentation/Changelog/master/Deprecation-83905-TypoScriptFrontendController-page_cache_reg1.rst [new file with mode: 0644]
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/indexed_search/Classes/Domain/Repository/AdministrationRepository.php
typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php
typo3/sysext/indexed_search/Classes/Indexer.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-83905-TypoScriptFrontendController-page_cache_reg1.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-83905-TypoScriptFrontendController-page_cache_reg1.rst
new file mode 100644 (file)
index 0000000..fad1dff
--- /dev/null
@@ -0,0 +1,34 @@
+.. include:: ../../Includes.txt
+
+===================================================================
+Deprecation: #83905 - TypoScriptFrontendController->page_cache_reg1
+===================================================================
+
+See :issue:`83905`
+
+Description
+===========
+
+Property :php:`TypoScriptFrontendController->page_cache_reg1` has been deprecated
+
+
+Impact
+======
+
+Setting this property triggers a deprecation log entry.
+
+
+Affected Installations
+======================
+
+This property was of very little use ever since, it is unlikely an instance runs an
+extension consuming it.
+The extension scanner will find usages.
+
+
+Migration
+=========
+
+Use method :php:`TypoScriptFrontendController->addCacheTags()` to influence page cache tagging.
+
+.. index:: Frontend, PHP-API, FullyScanned
\ No newline at end of file
index fa4b80c..89f8015 100644 (file)
@@ -184,6 +184,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
      * and later perform some external cache management, like clearing only a part
      * of the cache of a page...
      * @var int
+     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.
      */
     public $page_cache_reg1 = 0;
 
@@ -3137,6 +3138,8 @@ class TypoScriptFrontendController implements LoggerAwareInterface
         $this->cacheExpires = $expirationTstamp;
         $this->pageCacheTags[] = 'pageId_' . $cacheData['page_id'];
         if ($this->page_cache_reg1) {
+            // @deprecated since TYPO3 v9, will be removed in TYPO3 v10. Remove this "if" along with property page_cache_reg1
+            trigger_error('Property page_cache_reg1 has been deprecated and will be removed in core version 10', E_USER_DEPRECATED);
             $reg1 = (int)$this->page_cache_reg1;
             $cacheData['reg1'] = $reg1;
             $this->pageCacheTags[] = 'reg1_' . $reg1;
index c76a49e..7abfb89 100644 (file)
@@ -144,6 +144,7 @@ class AdministrationRepository
                 'cHashParams',
                 'data_filename',
                 'data_page_id',
+                // @deprecated since TYPO3 v9, will be removed in TYPO3 v10. Remove along with database field data_page_reg1
                 'data_page_reg1',
                 'data_page_type',
                 'data_page_mp',
@@ -329,6 +330,7 @@ class AdministrationRepository
                 'cHashParams',
                 'data_filename',
                 'data_page_id',
+                // @deprecated since TYPO3 v9, will be removed in TYPO3 v10. Remove along with database field data_page_reg1
                 'data_page_reg1',
                 'data_page_type',
                 'data_page_mp',
@@ -492,6 +494,7 @@ class AdministrationRepository
                 'IP.cHashParams',
                 'IP.data_filename',
                 'IP.data_page_id',
+                // @deprecated since TYPO3 v9, will be removed in TYPO3 v10. Remove along with database field data_page_reg1
                 'IP.data_page_reg1',
                 'IP.data_page_type',
                 'IP.data_page_mp',
@@ -528,6 +531,7 @@ class AdministrationRepository
                 'IP.cHashParams',
                 'IP.data_filename',
                 'IP.data_page_id',
+                // @deprecated since TYPO3 v9, will be removed in TYPO3 v10. Remove along with database field data_page_reg1
                 'IP.data_page_reg1',
                 'IP.data_page_type',
                 'IP.data_page_mp',
index 28ed736..7cec12b 100644 (file)
@@ -539,6 +539,7 @@ class IndexSearchRepository
             'IP.phash_grouping',
             'IP.data_filename',
             'IP.data_page_id',
+            // @deprecated since TYPO3 v9, will be removed in TYPO3 v10. Remove along with database field data_page_reg1
             'IP.data_page_reg1',
             'IP.data_page_type',
             'IP.data_page_mp',
@@ -1001,6 +1002,7 @@ class IndexSearchRepository
                 'IP.phash_grouping',
                 'IP.data_filename',
                 'IP.data_page_id',
+                // @deprecated since TYPO3 v9, will be removed in TYPO3 v10. Remove along with database field data_page_reg1
                 'IP.data_page_reg1',
                 'IP.data_page_type',
                 'IP.data_page_mp',
index 0355b4e..9e1dbe4 100644 (file)
@@ -289,8 +289,11 @@ class Indexer
                             // Array of the additional parameters
                             $this->conf['crdate'] = $pObj->page['crdate'];
                             // The creation date of the TYPO3 page
-                            $this->conf['page_cache_reg1'] = $pObj->page_cache_reg1;
+
                             // reg1 of the caching table. Not known what practical use this has.
+                            // @deprecated since TYPO3 v9, will be removed in TYPO3 v10. Remove along with database field data_page_reg1
+                            $this->conf['page_cache_reg1'] = $pObj->page_cache_reg1;
+
                             // Root line uids
                             $this->conf['rootline_uids'] = [];
                             foreach ($pObj->config['rootLine'] as $rlkey => $rldat) {
@@ -379,7 +382,10 @@ class Indexer
         // Set to defaults
         $this->conf['freeIndexUid'] = 0;
         $this->conf['freeIndexSetId'] = 0;
+
+        // @deprecated since TYPO3 v9, will be removed in TYPO3 v10. Remove along with database field data_page_reg1
         $this->conf['page_cache_reg1'] = 0;
+
         // Root line uids
         $this->conf['rootline_uids'] = $uidRL;
         // Configuration of behavior:
@@ -1437,6 +1443,7 @@ class Indexer
             'cHashParams' => serialize($this->cHashParams),
             'contentHash' => $this->content_md5h,
             'data_page_id' => $this->conf['id'],
+            // @deprecated since TYPO3 v9, will be removed in TYPO3 v10. Remove along with database field data_page_reg1
             'data_page_reg1' => $this->conf['page_cache_reg1'],
             'data_page_type' => $this->conf['type'],
             'data_page_mp' => $this->conf['MP'],
index d8bfb6f..af858e6 100644 (file)
@@ -326,4 +326,9 @@ return [
             'Deprecation-83606-ImpexpSizeHandlingRemoved.rst',
         ],
     ],
+    'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->page_cache_reg1' => [
+        'restFiles' => [
+            'Deprecation-83905-TypoScriptFrontendController-page_cache_reg1.rst',
+        ],
+    ],
 ];