function Deprecation::delegateTriggerToBackend
Parameters
list<array{function: string, line?: int, file?: string, class?: class-string, type?: string, args?: mixed[], object?: object}> $backtrace:
2 calls to Deprecation::delegateTriggerToBackend()
- Deprecation::trigger in vendor/
doctrine/ deprecations/ lib/ Doctrine/ Deprecations/ Deprecation.php - Trigger a deprecation for the given package and identfier.
- Deprecation::triggerIfCalledFromOutside in vendor/
doctrine/ deprecations/ lib/ Doctrine/ Deprecations/ Deprecation.php - Trigger a deprecation for the given package and identifier when called from outside.
File
-
vendor/
doctrine/ deprecations/ lib/ Doctrine/ Deprecations/ Deprecation.php, line 179
Class
- Deprecation
- Manages Deprecation logging in different ways.
Namespace
Doctrine\DeprecationsCode
private static function delegateTriggerToBackend(string $message, array $backtrace, string $link, string $package) : void {
$type = self::$type ?? self::getTypeFromEnv();
if (($type & self::TYPE_PSR_LOGGER) > 0) {
$context = [
'file' => $backtrace[0]['file'] ?? null,
'line' => $backtrace[0]['line'] ?? null,
'package' => $package,
'link' => $link,
];
assert(self::$logger !== null);
self::$logger->notice($message, $context);
}
if (!(($type & self::TYPE_TRIGGER_ERROR) > 0)) {
return;
}
$message .= sprintf(' (%s:%d called by %s:%d, %s, package %s)', self::basename($backtrace[0]['file'] ?? 'native code'), $backtrace[0]['line'] ?? 0, self::basename($backtrace[1]['file'] ?? 'native code'), $backtrace[1]['line'] ?? 0, $link, $package);
@trigger_error($message, E_USER_DEPRECATED);
}