fix PHP 7.4 preload error (#919)
This commit is contained in:
parent
c4161a0ebe
commit
24af6ac173
|
@ -74,4 +74,6 @@ abstract class AbstractClock implements ClockInterface
|
|||
* BC class alias
|
||||
* @todo: remove in future release. Also in composer.json autoload/files.
|
||||
*/
|
||||
class_alias(AbstractClock::class, 'OpenTelemetry\SDK\AbstractClock');
|
||||
if (!class_exists('OpenTelemetry\SDK\AbstractClock', false)) {
|
||||
class_alias(AbstractClock::class, 'OpenTelemetry\SDK\AbstractClock');
|
||||
}
|
||||
|
|
|
@ -13,7 +13,9 @@ interface ClockInterface extends Moved
|
|||
/**
|
||||
* @codeCoverageIgnoreStart
|
||||
*/
|
||||
class_alias(ClockInterface::class, 'OpenTelemetry\SDK\ClockInterface');
|
||||
if (!interface_exists('OpenTelemetry\SDK\ClockInterface', false)) {
|
||||
class_alias(ClockInterface::class, 'OpenTelemetry\SDK\ClockInterface');
|
||||
}
|
||||
/**
|
||||
* @codeCoverageIgnoreEnd
|
||||
*/
|
||||
|
|
|
@ -49,7 +49,9 @@ final class InstrumentationLibrary implements InstrumentationLibraryInterface
|
|||
}
|
||||
}
|
||||
|
||||
class_alias(InstrumentationLibrary::class, OpenTelemetry_SDK_InstrumentationLibrary);
|
||||
if (!class_exists(OpenTelemetry_SDK_InstrumentationLibrary, false)) {
|
||||
class_alias(InstrumentationLibrary::class, OpenTelemetry_SDK_InstrumentationLibrary);
|
||||
}
|
||||
/**
|
||||
* @codeCoverageIgnoreEnd
|
||||
*/
|
||||
|
|
|
@ -13,7 +13,9 @@ interface InstrumentationLibraryInterface extends Moved
|
|||
/**
|
||||
* @codeCoverageIgnoreStart
|
||||
*/
|
||||
class_alias(InstrumentationLibraryInterface::class, 'OpenTelemetry\SDK\Common\Instrumentation\InstrumentationLibraryInterface');
|
||||
if (!interface_exists('OpenTelemetry\SDK\Common\Instrumentation\InstrumentationLibraryInterface', false)) {
|
||||
class_alias(InstrumentationLibraryInterface::class, 'OpenTelemetry\SDK\Common\Instrumentation\InstrumentationLibraryInterface');
|
||||
}
|
||||
/**
|
||||
* @codeCoverageIgnoreEnd
|
||||
*/
|
||||
|
|
|
@ -25,7 +25,9 @@ final class LoggerHolder
|
|||
}
|
||||
}
|
||||
|
||||
class_alias(LoggerHolder::class, OpenTelemetry_SDK_Common_Log_LoggerHolder);
|
||||
if (!class_exists(OpenTelemetry_SDK_Common_Log_LoggerHolder, false)) {
|
||||
class_alias(LoggerHolder::class, OpenTelemetry_SDK_Common_Log_LoggerHolder);
|
||||
}
|
||||
/**
|
||||
* @codeCoverageIgnoreEnd
|
||||
*/
|
||||
|
|
|
@ -46,6 +46,8 @@ class OtlpExporter implements SpanExporterInterface
|
|||
}
|
||||
}
|
||||
|
||||
class_alias(OtlpExporter::class, 'OpenTelemetry\Contrib\OtlpGrpc\Exporter');
|
||||
class_alias(OtlpExporter::class, 'OpenTelemetry\Contrib\OtlpHttp\Exporter');
|
||||
class_alias(OtlpExporter::class, 'OpenTelemetry\Contrib\Otlp\Exporter');
|
||||
if (!class_exists('OpenTelemetry\Contrib\Otlp\Exporter', false)) {
|
||||
class_alias(OtlpExporter::class, 'OpenTelemetry\Contrib\OtlpGrpc\Exporter');
|
||||
class_alias(OtlpExporter::class, 'OpenTelemetry\Contrib\OtlpHttp\Exporter');
|
||||
class_alias(OtlpExporter::class, 'OpenTelemetry\Contrib\Otlp\Exporter');
|
||||
}
|
||||
|
|
|
@ -41,7 +41,9 @@ class SystemClock implements ClockInterface
|
|||
}
|
||||
}
|
||||
|
||||
class_alias(SystemClock::class, OpenTelemetry_SDK_SystemClock);
|
||||
if (!class_exists(OpenTelemetry_SDK_SystemClock, false)) {
|
||||
class_alias(SystemClock::class, OpenTelemetry_SDK_SystemClock);
|
||||
}
|
||||
/**
|
||||
* @codeCoverageIgnoreEnd
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue