Skip to content

Commit 196f3a1

Browse files
authored
Allows API packages to specify file-based and env-based config (#1621)
* Move `ComponentProvider` and related classes to API * Use API `ComponentProvider` * Use API `ComponentProvider` in tests * Add `EnvComponentLoader` API * Add `EnvComponentLoader` example * Ignore deptrac violations * Remove namespace from `ComponentProvider` BC layer * Add API requirement to config package * Fix/suppress unrelated phpstan errors caused by `google/protobuf` `^4.31`
1 parent 8b3ca1f commit 196f3a1

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

MetricConverter.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,7 @@ private function convertHistogramDataPoint(SDK\Metrics\Data\HistogramDataPoint $
204204
$pHistogramDataPoint->setTimeUnixNano($dataPoint->timestamp);
205205
$pHistogramDataPoint->setCount($dataPoint->count);
206206
$pHistogramDataPoint->setSum($dataPoint->sum);
207-
/** @phpstan-ignore-next-line */
208207
$pHistogramDataPoint->setBucketCounts($dataPoint->bucketCounts);
209-
/** @phpstan-ignore-next-line */
210208
$pHistogramDataPoint->setExplicitBounds($dataPoint->explicitBounds);
211209
foreach ($dataPoint->exemplars as $exemplar) {
212210
/** @psalm-suppress InvalidArgument */

ProtobufSerializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private static function serializeToJsonString(Message $message): string
103103
// @phan-suppress-next-line PhanUndeclaredClassReference
104104
if (\class_exists(\Google\Protobuf\PrintOptions::class)) {
105105
try {
106-
/** @psalm-suppress TooManyArguments @phan-suppress-next-line PhanParamTooManyInternal,PhanUndeclaredClassConstant @phpstan-ignore arguments.count */
106+
/** @psalm-suppress TooManyArguments @phan-suppress-next-line PhanParamTooManyInternal,PhanUndeclaredClassConstant */
107107
return $message->serializeToJsonString(\Google\Protobuf\PrintOptions::ALWAYS_PRINT_ENUMS_AS_INTS);
108108
} catch (\TypeError) {
109109
// google/protobuf ^4.31 w/ ext-protobuf <4.31 installed

0 commit comments

Comments
 (0)