function Util::triggerMethodDeprecationNotice
@psalm-suppress ArgumentTypeCoercion
3 calls to Util::triggerMethodDeprecationNotice()
- ResourceInfo::defaultResource in vendor/
open-telemetry/ sdk/ Resource/ ResourceInfo.php - @codeCoverageIgnore
- ResourceInfo::emptyResource in vendor/
open-telemetry/ sdk/ Resource/ ResourceInfo.php - @codeCoverageIgnore
- Span::formatStackTrace in vendor/
open-telemetry/ sdk/ Trace/ Span.php - Backward compatibility methods
File
-
vendor/
open-telemetry/ sdk/ Common/ Dev/ Compatibility/ Util.php, line 57
Class
Namespace
OpenTelemetry\SDK\Common\Dev\CompatibilityCode
public static function triggerMethodDeprecationNotice(string $methodName, ?string $alternativeMethodName = null, ?string $alternativeClassName = null) : void {
if (self::getErrorLevel() === self::E_NONE) {
return;
}
$notice = sprintf('Method "%s " is deprecated and will be removed in a future release. ', $methodName);
if ($alternativeMethodName !== null) {
$method = $alternativeClassName === null ? $alternativeMethodName : sprintf('%s::%s', $alternativeClassName, $alternativeMethodName);
$notice .= sprintf('Please, use "%s" instead.', $method);
}
trigger_error($notice, self::$errorLevel);
}