function Util::triggerClassDeprecationNotice
@psalm-suppress ArgumentTypeCoercion
File
-
vendor/
open-telemetry/ sdk/ Common/ Dev/ Compatibility/ Util.php, line 36
Class
Namespace
OpenTelemetry\SDK\Common\Dev\CompatibilityCode
public static function triggerClassDeprecationNotice(string $className, ?string $alternativeClassName = null) : void {
if (self::getErrorLevel() === self::E_NONE) {
return;
}
$notice = sprintf('Class "%s" is deprecated and will be removed in a future release. ', $className);
if ($alternativeClassName !== null) {
$notice .= sprintf('Please, use "%s" instead.', $alternativeClassName);
}
trigger_error($notice, self::$errorLevel);
}