aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--inc/Debug/DebugHelper.php18
-rw-r--r--lib/plugins/action.php4
-rw-r--r--lib/plugins/admin.php4
-rw-r--r--lib/plugins/auth.php4
-rw-r--r--lib/plugins/cli.php4
-rw-r--r--lib/plugins/remote.php4
-rw-r--r--lib/plugins/syntax.php4
7 files changed, 29 insertions, 13 deletions
diff --git a/inc/Debug/DebugHelper.php b/inc/Debug/DebugHelper.php
index 09ff76b0f..aebd8e20e 100644
--- a/inc/Debug/DebugHelper.php
+++ b/inc/Debug/DebugHelper.php
@@ -13,12 +13,12 @@ class DebugHelper
/**
* Log accesses to deprecated fucntions to the debug log
*
- * @param string $alternative (optional) The function or method that should be used instead
- * @param int $callerOffset (optional) How far the deprecated method is removed from this one
- *
+ * @param string $alternative (optional) The function or method that should be used instead
+ * @param int $callerOffset (optional) How far the deprecated method is removed from this one
+ * @param string $thing (optional) The deprecated thing, defaults to the calling method
* @triggers \dokuwiki\Debug::INFO_DEPRECATION_LOG_EVENT
*/
- public static function dbgDeprecatedFunction($alternative = '', $callerOffset = 1)
+ public static function dbgDeprecatedFunction($alternative = '', $callerOffset = 1, $thing = '')
{
global $conf;
/** @var EventHandler $EVENT_HANDLER */
@@ -38,12 +38,16 @@ class DebugHelper
list($self, $call) = $backtrace;
+ if (!$thing) {
+ $thing = trim(
+ (!empty($self['class']) ? ($self['class'] . '::') : '') .
+ $self['function'] . '()', ':');
+ }
+
self::triggerDeprecationEvent(
$backtrace,
$alternative,
- trim(
- (!empty($self['class']) ? ($self['class'] . '::') : '') .
- $self['function'] . '()', ':'),
+ $thing,
trim(
(!empty($call['class']) ? ($call['class'] . '::') : '') .
$call['function'] . '()', ':'),
diff --git a/lib/plugins/action.php b/lib/plugins/action.php
index a3cbec722..7ea78a888 100644
--- a/lib/plugins/action.php
+++ b/lib/plugins/action.php
@@ -1,2 +1,4 @@
<?php
-dbg_deprecated('Autoloading. Do not require() files yourself.');
+\dokuwiki\Debug\DebugHelper::dbgDeprecatedFunction(
+ 'Do not require() files yourself. Autoloading', 1, basename(__FILE__)
+);
diff --git a/lib/plugins/admin.php b/lib/plugins/admin.php
index a3cbec722..7ea78a888 100644
--- a/lib/plugins/admin.php
+++ b/lib/plugins/admin.php
@@ -1,2 +1,4 @@
<?php
-dbg_deprecated('Autoloading. Do not require() files yourself.');
+\dokuwiki\Debug\DebugHelper::dbgDeprecatedFunction(
+ 'Do not require() files yourself. Autoloading', 1, basename(__FILE__)
+);
diff --git a/lib/plugins/auth.php b/lib/plugins/auth.php
index a3cbec722..7ea78a888 100644
--- a/lib/plugins/auth.php
+++ b/lib/plugins/auth.php
@@ -1,2 +1,4 @@
<?php
-dbg_deprecated('Autoloading. Do not require() files yourself.');
+\dokuwiki\Debug\DebugHelper::dbgDeprecatedFunction(
+ 'Do not require() files yourself. Autoloading', 1, basename(__FILE__)
+);
diff --git a/lib/plugins/cli.php b/lib/plugins/cli.php
index a3cbec722..7ea78a888 100644
--- a/lib/plugins/cli.php
+++ b/lib/plugins/cli.php
@@ -1,2 +1,4 @@
<?php
-dbg_deprecated('Autoloading. Do not require() files yourself.');
+\dokuwiki\Debug\DebugHelper::dbgDeprecatedFunction(
+ 'Do not require() files yourself. Autoloading', 1, basename(__FILE__)
+);
diff --git a/lib/plugins/remote.php b/lib/plugins/remote.php
index a3cbec722..7ea78a888 100644
--- a/lib/plugins/remote.php
+++ b/lib/plugins/remote.php
@@ -1,2 +1,4 @@
<?php
-dbg_deprecated('Autoloading. Do not require() files yourself.');
+\dokuwiki\Debug\DebugHelper::dbgDeprecatedFunction(
+ 'Do not require() files yourself. Autoloading', 1, basename(__FILE__)
+);
diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php
index a3cbec722..7ea78a888 100644
--- a/lib/plugins/syntax.php
+++ b/lib/plugins/syntax.php
@@ -1,2 +1,4 @@
<?php
-dbg_deprecated('Autoloading. Do not require() files yourself.');
+\dokuwiki\Debug\DebugHelper::dbgDeprecatedFunction(
+ 'Do not require() files yourself. Autoloading', 1, basename(__FILE__)
+);