Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Util.php

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

Util

Namespace

OpenTelemetry\SDK\Common\Dev\Compatibility

Code

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);
}
RSS feed
Powered by Drupal