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:
parent
58e19760e3
commit
49638eae02
|
@ -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,
|
||||
|
|
|
@ -4,6 +4,9 @@ declare(strict_types=1);
|
|||
|
||||
namespace OpenTelemetry\SDK\Common\Dsn;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
interface DsnInterface
|
||||
{
|
||||
/** @var string */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -4,6 +4,9 @@ declare(strict_types=1);
|
|||
|
||||
namespace OpenTelemetry\SDK\Common\Dsn;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
interface FactoryInterface
|
||||
{
|
||||
public function fromArray(array $dsn): DsnInterface;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -4,6 +4,9 @@ declare(strict_types=1);
|
|||
|
||||
namespace OpenTelemetry\SDK\Common\Dsn;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
interface ParserInterface
|
||||
{
|
||||
public function parse(string $dsn): DsnInterface;
|
||||
|
|
Loading…
Reference in New Issue