Commit 0957fe4e authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Remove XCLASS definitions from cache classes

With #28063 many core cache classes are required directly during bootstrap.
This makes XCLASS impossible since those base classes are not instantiated
with t3lib_div::makeInstance() anymore. t3lib_cache is static and can not be
XCLASSED. The caching framework has a built-in feature to register and use own
implementations. The patch removes all XCLASS definitions of cache classes.

Change-Id: I1e624bb769b899a14491aa3ee1cca9da480ebfb6
Resolves: #28221
Related: #28063
Reviewed-on: http://review.typo3.org/3340
Reviewed-by: Stefan Neufeind
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
parent d2e60625
......@@ -144,9 +144,4 @@ abstract class t3lib_cache_backend_AbstractBackend implements t3lib_cache_backen
return $expiryTime;
}
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/backend/class.t3lib_cache_backend_abstractbackend.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/backend/class.t3lib_cache_backend_abstractbackend.php']);
}
?>
\ No newline at end of file
......@@ -22,7 +22,6 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* A caching backend which stores cache entries by using APC.
*
......@@ -315,10 +314,4 @@ class t3lib_cache_backend_ApcBackend extends t3lib_cache_backend_AbstractBackend
}
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/backend/class.t3lib_cache_backend_apcbackend.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/backend/class.t3lib_cache_backend_apcbackend.php']);
}
?>
\ No newline at end of file
......@@ -519,10 +519,4 @@ class t3lib_cache_backend_DbBackend extends t3lib_cache_backend_AbstractBackend
}
}
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/backend/class.t3lib_cache_backend_dbbackend.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/backend/class.t3lib_cache_backend_dbbackend.php']);
}
?>
\ No newline at end of file
......@@ -526,10 +526,4 @@ class t3lib_cache_backend_FileBackend extends t3lib_cache_backend_AbstractBacken
return ($this->isCacheFileExpired($pathAndFilename)) ? FALSE : require_once($pathAndFilename);
}
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/backend/class.t3lib_cache_backend_filebackend.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/backend/class.t3lib_cache_backend_filebackend.php']);
}
?>
\ No newline at end of file
......@@ -470,10 +470,4 @@ class t3lib_cache_backend_MemcachedBackend extends t3lib_cache_backend_AbstractB
public function collectGarbage() {
}
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/backend/class.t3lib_cache_backend_memcachedbackend.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/backend/class.t3lib_cache_backend_memcachedbackend.php']);
}
?>
\ No newline at end of file
......@@ -127,10 +127,4 @@ class t3lib_cache_backend_NullBackend extends t3lib_cache_backend_AbstractBacken
public function collectGarbage() {
}
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/backend/class.t3lib_cache_backend_nullbackend.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/backend/class.t3lib_cache_backend_nullbackend.php']);
}
?>
\ No newline at end of file
......@@ -371,8 +371,4 @@ class t3lib_cache_backend_PdoBackend extends t3lib_cache_backend_AbstractBackend
}
}
}
if (defined('TYPO3_MODE') && $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/backend/class.t3lib_cache_backend_pdobackend.php']) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/backend/class.t3lib_cache_backend_pdobackend.php']);
}
?>
\ No newline at end of file
......@@ -169,9 +169,4 @@ class t3lib_cache_backend_TransientMemoryBackend extends t3lib_cache_backend_Abs
public function collectGarbage() {
}
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/backend/class.t3lib_cache_backend_transientmemorybackend.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/backend/class.t3lib_cache_backend_transientmemorybackend.php']);
}
?>
\ No newline at end of file
......@@ -122,6 +122,5 @@ interface t3lib_cache_backend_Backend {
* @api
*/
public function collectGarbage();
}
?>
\ No newline at end of file
......@@ -42,6 +42,5 @@ interface t3lib_cache_backend_PhpCapableBackend extends t3lib_cache_backend_Back
* @api
*/
public function requireOnce($entryIdentifier);
}
?>
\ No newline at end of file
......@@ -22,7 +22,6 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* A generic Cache exception
*
......@@ -33,12 +32,5 @@
* @api
*/
class t3lib_cache_Exception extends Exception {
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/class.t3lib_cache_exception.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/class.t3lib_cache_exception.php']);
}
?>
\ No newline at end of file
......@@ -106,12 +106,5 @@ class t3lib_cache_Factory implements t3lib_Singleton {
$this->cacheManager->registerCache($cache);
return $cache;
}
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/class.t3lib_cache_factory.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/class.t3lib_cache_factory.php']);
}
?>
\ No newline at end of file
......@@ -276,10 +276,4 @@ class t3lib_cache_Manager implements t3lib_Singleton {
$this->cacheFactory->create($identifier, $frontend, $backend, $backendOptions);
}
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/class.t3lib_cache_manager.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/class.t3lib_cache_manager.php']);
}
?>
\ No newline at end of file
......@@ -22,7 +22,6 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* A "Class Already Loaded" exception
*
......@@ -33,12 +32,5 @@
* @api
*/
class t3lib_cache_exception_ClassAlreadyLoaded extends t3lib_cache_Exception {
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/exception/class.t3lib_cache_exception_classalreadyloaded.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/exception/class.t3lib_cache_exception_classalreadyloaded.php']);
}
?>
\ No newline at end of file
......@@ -22,7 +22,6 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* A "Duplicate Identifier" exception
*
......@@ -33,12 +32,5 @@
* @api
*/
class t3lib_cache_exception_DuplicateIdentifier extends t3lib_cache_Exception {
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/exception/class.t3lib_cache_exception_duplicateidentifier.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/exception/class.t3lib_cache_exception_duplicateidentifier.php']);
}
?>
\ No newline at end of file
......@@ -22,7 +22,6 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* An "Invalid Backend" exception
*
......@@ -33,12 +32,5 @@
* @api
*/
class t3lib_cache_exception_InvalidBackend extends t3lib_cache_Exception {
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/exception/class.t3lib_cache_exception_invalidbackend.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/exception/class.t3lib_cache_exception_invalidbackend.php']);
}
?>
\ No newline at end of file
......@@ -22,7 +22,6 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* An "Invalid Cache" exception
*
......@@ -33,12 +32,5 @@
* @api
*/
class t3lib_cache_exception_InvalidCache extends t3lib_cache_Exception {
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/exception/class.t3lib_cache_exception_invalidcache.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/exception/class.t3lib_cache_exception_invalidcache.php']);
}
?>
\ No newline at end of file
......@@ -22,7 +22,6 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* An "Invalid Data" exception
*
......@@ -33,12 +32,5 @@
* @api
*/
class t3lib_cache_exception_InvalidData extends t3lib_cache_Exception {
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/exception/class.t3lib_cache_exception_invaliddata.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/exception/class.t3lib_cache_exception_invaliddata.php']);
}
?>
\ No newline at end of file
......@@ -22,7 +22,6 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* A "No Such Cache" exception
*
......@@ -33,12 +32,5 @@
* @api
*/
class t3lib_cache_exception_NoSuchCache extends t3lib_cache_Exception {
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/exception/class.t3lib_cache_exception_nosuchcache.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/exception/class.t3lib_cache_exception_nosuchcache.php']);
}
?>
\ No newline at end of file
......@@ -221,12 +221,5 @@ abstract class t3lib_cache_frontend_AbstractFrontend implements t3lib_cache_fron
public function isValidTag($tag) {
return preg_match(self::PATTERN_TAG, $tag) === 1;
}
}
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/frontend/class.t3lib_cache_frontend_abstractfrontend.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/cache/frontend/class.t3lib_cache_frontend_abstractfrontend.php']);
}
?>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment