deprecate sdk/common/dsn (#1037)

I can't find any usage of these classes anywhere in main or contrib repo. rather than delete, lets deprecate and remove closer to release candidate
This commit is contained in:
Brett McBride 2023-06-23 21:02:56 +10:00 committed by GitHub
parent 58e19760e3
commit 49638eae02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 0 deletions

View File

@ -4,6 +4,10 @@ declare(strict_types=1);
namespace OpenTelemetry\SDK\Common\Dsn;
/**
* @deprecated
* @phan-suppress PhanDeprecatedInterface
*/
class Dsn implements DsnInterface
{
private string $type;
@ -37,6 +41,9 @@ class Dsn implements DsnInterface
$this->password = $password;
}
/**
* @phan-suppress PhanDeprecatedClass
*/
public static function create(
string $type,
string $scheme,

View File

@ -4,6 +4,9 @@ declare(strict_types=1);
namespace OpenTelemetry\SDK\Common\Dsn;
/**
* @deprecated
*/
interface DsnInterface
{
/** @var string */

View File

@ -6,6 +6,10 @@ namespace OpenTelemetry\SDK\Common\Dsn;
use InvalidArgumentException;
/**
* @phan-suppress PhanDeprecatedInterface
* @phan-suppress PhanDeprecatedClass
*/
final class Factory implements FactoryInterface
{
/** @var array */
@ -29,6 +33,7 @@ final class Factory implements FactoryInterface
/**
* @phan-suppress PhanUndeclaredClassAttribute
* @phan-suppress PhanDeprecatedClass
*/
#[\ReturnTypeWillChange]
public function fromArray(array $dsn): Dsn

View File

@ -4,6 +4,9 @@ declare(strict_types=1);
namespace OpenTelemetry\SDK\Common\Dsn;
/**
* @deprecated
*/
interface FactoryInterface
{
public function fromArray(array $dsn): DsnInterface;

View File

@ -6,6 +6,11 @@ namespace OpenTelemetry\SDK\Common\Dsn;
use InvalidArgumentException;
/**
* @deprecated
* @phan-suppress PhanDeprecatedInterface
* @phan-suppress PhanDeprecatedClass
*/
class Parser implements ParserInterface
{
private const QUERY_ATTRIBUTE = 'query';
@ -19,6 +24,9 @@ class Parser implements ParserInterface
$this->factory = $factory ?? Factory::create();
}
/**
* @phan-suppress PhanDeprecatedClass
*/
public static function create(FactoryInterface $factory = null): self
{
return new self($factory);

View File

@ -4,6 +4,9 @@ declare(strict_types=1);
namespace OpenTelemetry\SDK\Common\Dsn;
/**
* @deprecated
*/
interface ParserInterface
{
public function parse(string $dsn): DsnInterface;