Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@
},
"require-dev": {
"ext-grpc": "*",
"grpc/grpc": "^1.30",
"bamarni/composer-bin-plugin": "^1.8",
"dg/bypass-finals": "^1.4",
"grpc/grpc": "^1.30",
"guzzlehttp/guzzle": "^7.4",
"guzzlehttp/psr7": "^2.1",
"mikey179/vfsstream": "^1.6.11",
Expand Down Expand Up @@ -193,6 +193,15 @@
],
"OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\Instrumentation": [
"OpenTelemetry\\Example\\ExampleInstrumentation"
],
"OpenTelemetry\\SDK\\Common\\Configuration\\Resolver\\ResolverInterface": [
"OpenTelemetry\\SDK\\Common\\Configuration\\Resolver\\SdkConfigurationResolver"
],
"OpenTelemetry\\Config\\SDK\\Configuration\\Environment\\EnvSourceProvider": [
"OpenTelemetry\\Config\\SDK\\Configuration\\Environment\\Adapter\\SymfonyDotenvProvider",
"OpenTelemetry\\Config\\SDK\\Configuration\\Environment\\Adapter\\VlucasPhpdotenvProvider",

"OpenTelemetry\\Tests\\Integration\\SDK\\Common\\Configuration\\TestEnvSourceProvider"
]
}
}
Expand Down
8 changes: 7 additions & 1 deletion deptrac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@ deptrac:
value: deptrac/polyfills/.*
- type: directory
value: vendor/symfony/polyfill-php83

- name: DotenvProvider
collectors:
- type: className
regex: ^Symfony\\Component\\Dotenv\\*
- type: className
regex: ^Dotenv\\*
ruleset:
Context:
- FFI
Expand All @@ -134,6 +139,7 @@ deptrac:
- Contrib
- Extension
- Polyfills
- DotenvProvider
API:
- Context
- PsrLog
Expand Down
12 changes: 12 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,15 @@ parameters:
message: "#.*expects Google\\\\Protobuf\\\\RepeatedField.*#"
paths:
- src/Contrib/Otlp
-
message: "#^Call to (static )?method .* on an unknown class .*#"
paths:
- src/Config/SDK/Configuration/Environment/Adapter/
-
message: "#^Instantiated class .* not found\\.#"
paths:
- src/Config/SDK/Configuration/Environment/Adapter/
-
message: "#^Caught class .* not found\\.#"
paths:
- src/Config/SDK/Configuration/Environment/Adapter/
22 changes: 14 additions & 8 deletions src/Config/SDK/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
use OpenTelemetry\API\Configuration\Context;
use OpenTelemetry\Config\SDK\ComponentProvider\OpenTelemetrySdk;
use OpenTelemetry\Config\SDK\Configuration\ConfigurationFactory;
use OpenTelemetry\Config\SDK\Configuration\Environment\EnvReader;
use OpenTelemetry\Config\SDK\Configuration\Environment\EnvSourceReader;
use OpenTelemetry\Config\SDK\Configuration\Environment\PhpIniEnvSource;
use OpenTelemetry\Config\SDK\Configuration\Environment\ServerEnvSource;
use OpenTelemetry\SDK\SdkBuilder;
use WeakMap;

final class Configuration
{
Expand All @@ -37,24 +39,28 @@ public static function parseFile(
string|array $file,
?string $cacheFile = null,
bool $debug = true,
?EnvReader $envReader = null,
): Configuration {
return new self(self::factory()->parseFile($file, $cacheFile, $debug));
return new self(self::factory($envReader)->parseFile($file, $cacheFile, $debug));
}

/**
* @return ConfigurationFactory<SdkBuilder>
*/
private static function factory(): ConfigurationFactory
private static function factory(?EnvReader $envReader): ConfigurationFactory
{
static $factory;
static $defaultEnvReader;
static $factories = new WeakMap();

return $factory ??= new ConfigurationFactory(
$envReader ??= $defaultEnvReader ??= new EnvSourceReader([
new ServerEnvSource(),
new PhpIniEnvSource(),
]);

return $factories[$envReader] ??= new ConfigurationFactory(
self::loadComponentProviders(),
new OpenTelemetrySdk(),
new EnvSourceReader([
new ServerEnvSource(),
new PhpIniEnvSource(),
]),
$envReader,
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

declare(strict_types=1);

namespace OpenTelemetry\Config\SDK\Configuration\Environment\Adapter;

use function array_diff_key;
use Composer\InstalledVersions;
use Nevay\SPI\ServiceProviderDependency\PackageDependency;
use OpenTelemetry\Config\SDK\Configuration\Environment\ArrayEnvSource;
use OpenTelemetry\Config\SDK\Configuration\Environment\EnvSource;
use OpenTelemetry\Config\SDK\Configuration\Environment\EnvSourceProvider;
use Symfony\Component\Dotenv\Dotenv;
use Symfony\Component\Dotenv\Exception\PathException;

#[PackageDependency('symfony/dotenv', '^5.4 || ^6.4 || ^7.0')]
final class SymfonyDotenvProvider implements EnvSourceProvider
{
/** @psalm-suppress UndefinedClass */
public function getEnvSource(): EnvSource

Check failure on line 20 in src/Config/SDK/Configuration/Environment/Adapter/SymfonyDotenvProvider.php

View workflow job for this annotation

GitHub Actions / php (8.2, false)

MissingOverrideAttribute

src/Config/SDK/Configuration/Environment/Adapter/SymfonyDotenvProvider.php:20:5: MissingOverrideAttribute: Method OpenTelemetry\Config\SDK\Configuration\Environment\Adapter\SymfonyDotenvProvider::getenvsource should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 20 in src/Config/SDK/Configuration/Environment/Adapter/SymfonyDotenvProvider.php

View workflow job for this annotation

GitHub Actions / php (8.1, false)

MissingOverrideAttribute

src/Config/SDK/Configuration/Environment/Adapter/SymfonyDotenvProvider.php:20:5: MissingOverrideAttribute: Method OpenTelemetry\Config\SDK\Configuration\Environment\Adapter\SymfonyDotenvProvider::getenvsource should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 20 in src/Config/SDK/Configuration/Environment/Adapter/SymfonyDotenvProvider.php

View workflow job for this annotation

GitHub Actions / php (8.3, false)

MissingOverrideAttribute

src/Config/SDK/Configuration/Environment/Adapter/SymfonyDotenvProvider.php:20:5: MissingOverrideAttribute: Method OpenTelemetry\Config\SDK\Configuration\Environment\Adapter\SymfonyDotenvProvider::getenvsource should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 20 in src/Config/SDK/Configuration/Environment/Adapter/SymfonyDotenvProvider.php

View workflow job for this annotation

GitHub Actions / php (8.4, false, --ignore-platform-reqs)

MissingOverrideAttribute

src/Config/SDK/Configuration/Environment/Adapter/SymfonyDotenvProvider.php:20:5: MissingOverrideAttribute: Method OpenTelemetry\Config\SDK\Configuration\Environment\Adapter\SymfonyDotenvProvider::getenvsource should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 20 in src/Config/SDK/Configuration/Environment/Adapter/SymfonyDotenvProvider.php

View workflow job for this annotation

GitHub Actions / php (8.5, true, --ignore-platform-reqs)

MissingOverrideAttribute

src/Config/SDK/Configuration/Environment/Adapter/SymfonyDotenvProvider.php:20:5: MissingOverrideAttribute: Method OpenTelemetry\Config\SDK\Configuration\Environment\Adapter\SymfonyDotenvProvider::getenvsource should have the "Override" attribute (see https://psalm.dev/358)
{
$installPath = InstalledVersions::getRootPackage()['install_path'];

$backup = [$_SERVER, $_ENV];
$env = [];

try {
(new Dotenv())->bootEnv($installPath . '/.env');
$env = $_SERVER;
} catch (PathException) {
} finally {
[$_SERVER, $_ENV] = $backup;
}

return new ArrayEnvSource(array_diff_key($env, $_SERVER));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

declare(strict_types=1);

namespace OpenTelemetry\Config\SDK\Configuration\Environment\Adapter;

use Composer\InstalledVersions;
use Dotenv\Dotenv;
use Dotenv\Exception\InvalidPathException;
use Nevay\SPI\ServiceProviderDependency\PackageDependency;
use OpenTelemetry\Config\SDK\Configuration\Environment\ArrayEnvSource;
use OpenTelemetry\Config\SDK\Configuration\Environment\EnvSource;
use OpenTelemetry\Config\SDK\Configuration\Environment\EnvSourceProvider;

#[PackageDependency('vlucas/phpdotenv', '^4.0 || ^5.0')]
final class VlucasPhpdotenvProvider implements EnvSourceProvider
{
/** @psalm-suppress UndefinedClass */
public function getEnvSource(): EnvSource

Check failure on line 19 in src/Config/SDK/Configuration/Environment/Adapter/VlucasPhpdotenvProvider.php

View workflow job for this annotation

GitHub Actions / php (8.2, false)

MissingOverrideAttribute

src/Config/SDK/Configuration/Environment/Adapter/VlucasPhpdotenvProvider.php:19:5: MissingOverrideAttribute: Method OpenTelemetry\Config\SDK\Configuration\Environment\Adapter\VlucasPhpdotenvProvider::getenvsource should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 19 in src/Config/SDK/Configuration/Environment/Adapter/VlucasPhpdotenvProvider.php

View workflow job for this annotation

GitHub Actions / php (8.1, false)

MissingOverrideAttribute

src/Config/SDK/Configuration/Environment/Adapter/VlucasPhpdotenvProvider.php:19:5: MissingOverrideAttribute: Method OpenTelemetry\Config\SDK\Configuration\Environment\Adapter\VlucasPhpdotenvProvider::getenvsource should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 19 in src/Config/SDK/Configuration/Environment/Adapter/VlucasPhpdotenvProvider.php

View workflow job for this annotation

GitHub Actions / php (8.3, false)

MissingOverrideAttribute

src/Config/SDK/Configuration/Environment/Adapter/VlucasPhpdotenvProvider.php:19:5: MissingOverrideAttribute: Method OpenTelemetry\Config\SDK\Configuration\Environment\Adapter\VlucasPhpdotenvProvider::getenvsource should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 19 in src/Config/SDK/Configuration/Environment/Adapter/VlucasPhpdotenvProvider.php

View workflow job for this annotation

GitHub Actions / php (8.4, false, --ignore-platform-reqs)

MissingOverrideAttribute

src/Config/SDK/Configuration/Environment/Adapter/VlucasPhpdotenvProvider.php:19:5: MissingOverrideAttribute: Method OpenTelemetry\Config\SDK\Configuration\Environment\Adapter\VlucasPhpdotenvProvider::getenvsource should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 19 in src/Config/SDK/Configuration/Environment/Adapter/VlucasPhpdotenvProvider.php

View workflow job for this annotation

GitHub Actions / php (8.5, true, --ignore-platform-reqs)

MissingOverrideAttribute

src/Config/SDK/Configuration/Environment/Adapter/VlucasPhpdotenvProvider.php:19:5: MissingOverrideAttribute: Method OpenTelemetry\Config\SDK\Configuration\Environment\Adapter\VlucasPhpdotenvProvider::getenvsource should have the "Override" attribute (see https://psalm.dev/358)
{
$backup = [$_SERVER, $_ENV];
$env = [];

try {
$env = Dotenv::createImmutable([InstalledVersions::getRootPackage()['install_path']])->load();
} catch (InvalidPathException) {
} finally {
[$_SERVER, $_ENV] = $backup;
}

return new ArrayEnvSource(array_diff_key($env, $_SERVER));
}
}
10 changes: 10 additions & 0 deletions src/Config/SDK/Configuration/Environment/EnvSourceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

declare(strict_types=1);

namespace OpenTelemetry\Config\SDK\Configuration\Environment;

interface EnvSourceProvider
{
public function getEnvSource(): EnvSource;
}
27 changes: 27 additions & 0 deletions src/Config/SDK/Configuration/Environment/LazyEnvSource.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

namespace OpenTelemetry\Config\SDK\Configuration\Environment;

use Closure;

final class LazyEnvSource implements EnvSource
{
/**
* @param Closure(): EnvSource|EnvSource $env
*/
public function __construct(
private Closure|EnvSource $env,
) {
}

public function readRaw(string $name): mixed

Check failure on line 19 in src/Config/SDK/Configuration/Environment/LazyEnvSource.php

View workflow job for this annotation

GitHub Actions / php (8.2, false)

MissingOverrideAttribute

src/Config/SDK/Configuration/Environment/LazyEnvSource.php:19:5: MissingOverrideAttribute: Method OpenTelemetry\Config\SDK\Configuration\Environment\LazyEnvSource::readraw should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 19 in src/Config/SDK/Configuration/Environment/LazyEnvSource.php

View workflow job for this annotation

GitHub Actions / php (8.1, false)

MissingOverrideAttribute

src/Config/SDK/Configuration/Environment/LazyEnvSource.php:19:5: MissingOverrideAttribute: Method OpenTelemetry\Config\SDK\Configuration\Environment\LazyEnvSource::readraw should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 19 in src/Config/SDK/Configuration/Environment/LazyEnvSource.php

View workflow job for this annotation

GitHub Actions / php (8.3, false)

MissingOverrideAttribute

src/Config/SDK/Configuration/Environment/LazyEnvSource.php:19:5: MissingOverrideAttribute: Method OpenTelemetry\Config\SDK\Configuration\Environment\LazyEnvSource::readraw should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 19 in src/Config/SDK/Configuration/Environment/LazyEnvSource.php

View workflow job for this annotation

GitHub Actions / php (8.4, false, --ignore-platform-reqs)

MissingOverrideAttribute

src/Config/SDK/Configuration/Environment/LazyEnvSource.php:19:5: MissingOverrideAttribute: Method OpenTelemetry\Config\SDK\Configuration\Environment\LazyEnvSource::readraw should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 19 in src/Config/SDK/Configuration/Environment/LazyEnvSource.php

View workflow job for this annotation

GitHub Actions / php (8.5, true, --ignore-platform-reqs)

MissingOverrideAttribute

src/Config/SDK/Configuration/Environment/LazyEnvSource.php:19:5: MissingOverrideAttribute: Method OpenTelemetry\Config\SDK\Configuration\Environment\LazyEnvSource::readraw should have the "Override" attribute (see https://psalm.dev/358)
{
if (!$this->env instanceof EnvSource) {
$this->env = ($this->env)();
}

return $this->env->readRaw($name);
}
}
22 changes: 14 additions & 8 deletions src/Config/SDK/Instrumentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
use OpenTelemetry\API\Instrumentation\AutoInstrumentation\ConfigurationRegistry;
use OpenTelemetry\Config\SDK\ComponentProvider\InstrumentationConfigurationRegistry;
use OpenTelemetry\Config\SDK\Configuration\ConfigurationFactory;
use OpenTelemetry\Config\SDK\Configuration\Environment\EnvReader;
use OpenTelemetry\Config\SDK\Configuration\Environment\EnvSourceReader;
use OpenTelemetry\Config\SDK\Configuration\Environment\PhpIniEnvSource;
use OpenTelemetry\Config\SDK\Configuration\Environment\ServerEnvSource;
use WeakMap;

final class Instrumentation
{
Expand All @@ -39,24 +41,28 @@ public static function parseFile(
string|array $file,
?string $cacheFile = null,
bool $debug = true,
?EnvReader $envReader = null,
): Instrumentation {
return new self(self::factory()->parseFile($file, $cacheFile, $debug));
return new self(self::factory($envReader)->parseFile($file, $cacheFile, $debug));
}

/**
* @return ConfigurationFactory<ConfigurationRegistry>
*/
private static function factory(): ConfigurationFactory
private static function factory(?EnvReader $envReader): ConfigurationFactory
{
static $factory;
static $defaultEnvReader;
static $factories = new WeakMap();

return $factory ??= new ConfigurationFactory(
$envReader ??= $defaultEnvReader ??= new EnvSourceReader([
new ServerEnvSource(),
new PhpIniEnvSource(),
]);

return $factories[$envReader] ??= new ConfigurationFactory(
self::loadComponentProviders(),
new InstrumentationConfigurationRegistry(),
new EnvSourceReader([
new ServerEnvSource(),
new PhpIniEnvSource(),
]),
$envReader,
);
}

Expand Down
6 changes: 5 additions & 1 deletion src/Config/SDK/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"open-telemetry/context": "^1.0",
"open-telemetry/sdk": "^1.0",
"symfony/config": "^5.4 || ^6.4 || ^7.0",
"tbachert/spi": "^1.0.1"
"tbachert/spi": "^1.0.5"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -82,6 +82,10 @@

"OpenTelemetry\\Config\\SDK\\ComponentProvider\\Instrumentation\\General\\HttpConfigProvider",
"OpenTelemetry\\Config\\SDK\\ComponentProvider\\Instrumentation\\General\\PeerConfigProvider"
],
"OpenTelemetry\\Config\\SDK\\Configuration\\Environment\\EnvSourceProvider": [
"OpenTelemetry\\Config\\SDK\\Configuration\\Environment\\Adapter\\SymfonyDotenvProvider",
"OpenTelemetry\\Config\\SDK\\Configuration\\Environment\\Adapter\\VlucasPhpdotenvProvider"
]
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/SDK/Common/Configuration/Resolver/CompositeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace OpenTelemetry\SDK\Common\Configuration\Resolver;

use Nevay\SPI\ServiceLoader;
use OpenTelemetry\SDK\Common\Configuration\Configuration;

/**
Expand All @@ -18,6 +19,7 @@ public static function instance(): self
{
static $instance;
$instance ??= new self([
...ServiceLoader::load(ResolverInterface::class),
new EnvironmentResolver(),
new PhpIniResolver(),
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,7 @@
return !Configuration::isEmpty($env);
}

/**
* @psalm-suppress InvalidReturnStatement
* @psalm-suppress InvalidReturnType
*/
#[\Override]
public function retrieveValue(string $variableName)
public function retrieveValue(string $variableName): mixed

Check failure on line 28 in src/SDK/Common/Configuration/Resolver/EnvironmentResolver.php

View workflow job for this annotation

GitHub Actions / php (8.2, false)

MissingOverrideAttribute

src/SDK/Common/Configuration/Resolver/EnvironmentResolver.php:28:5: MissingOverrideAttribute: Method OpenTelemetry\SDK\Common\Configuration\Resolver\EnvironmentResolver::retrievevalue should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 28 in src/SDK/Common/Configuration/Resolver/EnvironmentResolver.php

View workflow job for this annotation

GitHub Actions / php (8.1, false)

MissingOverrideAttribute

src/SDK/Common/Configuration/Resolver/EnvironmentResolver.php:28:5: MissingOverrideAttribute: Method OpenTelemetry\SDK\Common\Configuration\Resolver\EnvironmentResolver::retrievevalue should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 28 in src/SDK/Common/Configuration/Resolver/EnvironmentResolver.php

View workflow job for this annotation

GitHub Actions / php (8.3, false)

MissingOverrideAttribute

src/SDK/Common/Configuration/Resolver/EnvironmentResolver.php:28:5: MissingOverrideAttribute: Method OpenTelemetry\SDK\Common\Configuration\Resolver\EnvironmentResolver::retrievevalue should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 28 in src/SDK/Common/Configuration/Resolver/EnvironmentResolver.php

View workflow job for this annotation

GitHub Actions / php (8.4, false, --ignore-platform-reqs)

MissingOverrideAttribute

src/SDK/Common/Configuration/Resolver/EnvironmentResolver.php:28:5: MissingOverrideAttribute: Method OpenTelemetry\SDK\Common\Configuration\Resolver\EnvironmentResolver::retrievevalue should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 28 in src/SDK/Common/Configuration/Resolver/EnvironmentResolver.php

View workflow job for this annotation

GitHub Actions / php (8.5, true, --ignore-platform-reqs)

MissingOverrideAttribute

src/SDK/Common/Configuration/Resolver/EnvironmentResolver.php:28:5: MissingOverrideAttribute: Method OpenTelemetry\SDK\Common\Configuration\Resolver\EnvironmentResolver::retrievevalue should have the "Override" attribute (see https://psalm.dev/358)
{
$value = getenv($variableName);
if ($value === false) {
Expand Down
3 changes: 1 addition & 2 deletions src/SDK/Common/Configuration/Resolver/PhpIniResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}

#[\Override]
public function retrieveValue(string $variableName)
public function retrieveValue(string $variableName): mixed
{
$value = $this->accessor->get($variableName) ?: '';
if (is_array($value)) {
Expand All @@ -27,8 +27,7 @@
return $value;
}

#[\Override]
public function hasVariable(string $variableName): bool

Check failure on line 30 in src/SDK/Common/Configuration/Resolver/PhpIniResolver.php

View workflow job for this annotation

GitHub Actions / php (8.2, false)

MissingOverrideAttribute

src/SDK/Common/Configuration/Resolver/PhpIniResolver.php:30:5: MissingOverrideAttribute: Method OpenTelemetry\SDK\Common\Configuration\Resolver\PhpIniResolver::hasvariable should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 30 in src/SDK/Common/Configuration/Resolver/PhpIniResolver.php

View workflow job for this annotation

GitHub Actions / php (8.1, false)

MissingOverrideAttribute

src/SDK/Common/Configuration/Resolver/PhpIniResolver.php:30:5: MissingOverrideAttribute: Method OpenTelemetry\SDK\Common\Configuration\Resolver\PhpIniResolver::hasvariable should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 30 in src/SDK/Common/Configuration/Resolver/PhpIniResolver.php

View workflow job for this annotation

GitHub Actions / php (8.3, false)

MissingOverrideAttribute

src/SDK/Common/Configuration/Resolver/PhpIniResolver.php:30:5: MissingOverrideAttribute: Method OpenTelemetry\SDK\Common\Configuration\Resolver\PhpIniResolver::hasvariable should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 30 in src/SDK/Common/Configuration/Resolver/PhpIniResolver.php

View workflow job for this annotation

GitHub Actions / php (8.4, false, --ignore-platform-reqs)

MissingOverrideAttribute

src/SDK/Common/Configuration/Resolver/PhpIniResolver.php:30:5: MissingOverrideAttribute: Method OpenTelemetry\SDK\Common\Configuration\Resolver\PhpIniResolver::hasvariable should have the "Override" attribute (see https://psalm.dev/358)

Check failure on line 30 in src/SDK/Common/Configuration/Resolver/PhpIniResolver.php

View workflow job for this annotation

GitHub Actions / php (8.5, true, --ignore-platform-reqs)

MissingOverrideAttribute

src/SDK/Common/Configuration/Resolver/PhpIniResolver.php:30:5: MissingOverrideAttribute: Method OpenTelemetry\SDK\Common\Configuration\Resolver\PhpIniResolver::hasvariable should have the "Override" attribute (see https://psalm.dev/358)
{
$value = $this->accessor->get($variableName);
if ($value === []) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@

interface ResolverInterface
{
/**
* @return mixed
*/
public function retrieveValue(string $variableName);
public function retrieveValue(string $variableName): mixed;

public function hasVariable(string $variableName): bool;
}
Loading
Loading