Skip to content

Commit 2af4ddb

Browse files
committed
Removed use of Stringable in production code
1 parent 50a2a60 commit 2af4ddb

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

agent/php/ElasticApm/Impl/Util/UrlParts.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@
2525

2626
use Elastic\Apm\Impl\Log\LoggableInterface;
2727
use Elastic\Apm\Impl\Log\LoggableTrait;
28-
use Stringable;
2928

3029
/**
3130
* Code in this file is part of implementation internals and thus it is not covered by the backward compatibility.
3231
*
3332
* @internal
3433
*/
35-
final class UrlParts implements LoggableInterface, Stringable
34+
final class UrlParts implements LoggableInterface
3635
{
3736
use LoggableTrait;
3837

agent/php/ElasticApm/Impl/Util/WildcardListMatcher.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,12 @@
2323

2424
namespace Elastic\Apm\Impl\Util;
2525

26-
use Stringable;
27-
2826
/**
2927
* Code in this file is part of implementation internals and thus it is not covered by the backward compatibility.
3028
*
3129
* @internal
3230
*/
33-
final class WildcardListMatcher implements Stringable
31+
final class WildcardListMatcher
3432
{
3533
/** @var WildcardMatcher[] */
3634
private $matchers;

agent/php/ElasticApm/Impl/Util/WildcardMatcher.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,12 @@
2323

2424
namespace Elastic\Apm\Impl\Util;
2525

26-
use Stringable;
27-
2826
/**
2927
* Code in this file is part of implementation internals and thus it is not covered by the backward compatibility.
3028
*
3129
* @internal
3230
*/
33-
final class WildcardMatcher implements Stringable
31+
final class WildcardMatcher
3432
{
3533
private const CASE_SENSITIVE_PREFIX = '(?-i)';
3634
private const WILDCARD = '*';

tests/ElasticApmTests/ComponentTests/ConfigSettingTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
use ElasticApmTests\Util\MixedMap;
4747
use ElasticApmTests\Util\TextUtilForTests;
4848
use ElasticApmTests\Util\TransactionExpectations;
49-
use Stringable;
5049

5150
/**
5251
* @group smoke
@@ -297,8 +296,7 @@ private static function adaptParsedValueToCompare($optParsedValue)
297296
}
298297

299298
if (is_object($optParsedValue)) {
300-
self::assertInstanceOf(Stringable::class, $optParsedValue);
301-
return strval($optParsedValue);
299+
return TextUtilForTests::valuetoString($optParsedValue);
302300
}
303301

304302
self::fail('Unexpected $optParsedValue type: ' . DbgUtil::getType($optParsedValue));

0 commit comments

Comments
 (0)