Index: t3lib/class.t3lib_div.php =================================================================== --- t3lib/class.t3lib_div.php (revision 6721) +++ t3lib/class.t3lib_div.php (working copy) @@ -5545,7 +5545,31 @@ $logMsg .= ' (' . substr($function->getFileName(), strlen(PATH_site)) . '#' . $function->getStartLine() . ')'; self::deprecationLog($logMsg); } + + /** + * Logs a require/include of a deprecated class file. + * @return void + */ + public static function logDeprecatedRequire() { + if (!$GLOBALS['TYPO3_CONF_VARS']['SYS']['enableDeprecationLog']) { + return; + } + + $trail = debug_backtrace(); + if (in_array($trail[1]['function'], array('require', 'require_once', 'include', 'include_once'))) { + // trigger PHP error with a short message: is deprecated (included in ) + $errorMsg = substr($trail[0]['file'], strlen(PATH_site)) + . ' is deprecated (included in ' . substr($trail[1]['file'], strlen(PATH_site)) . '#' . $trail[1]['line'] . ')'; + + // disabled until error handling is implemented + + // write a message to the deprecation log: - + $logMsg = substr($trail[0]['file'], strlen(PATH_site)) . ' - ' . $errorMsg; + self::deprecationLog($logMsg); + } + } + /** * Converts a one dimensional array to a one line string which can be used for logging or debugging output * Example: "loginType: FE; refInfo: Array; HTTP_HOST: www.example.org; REMOTE_ADDR: 192.168.1.5; REMOTE_HOST:; security_level:; showHiddenRecords: 0;"