mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-17 16:26:51 +03:00
Move deprecated interface methods to DeprecatedUuidInterface
This commit is contained in:
+4
-123
@@ -14,9 +14,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Ramsey\Uuid;
|
||||
|
||||
use DateTimeInterface;
|
||||
use JsonSerializable;
|
||||
use Ramsey\Uuid\Converter\NumberConverterInterface;
|
||||
use Ramsey\Uuid\Fields\FieldsInterface;
|
||||
use Serializable;
|
||||
|
||||
@@ -26,7 +24,10 @@ use Serializable;
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
interface UuidInterface extends JsonSerializable, Serializable
|
||||
interface UuidInterface extends
|
||||
DeprecatedUuidInterface,
|
||||
JsonSerializable,
|
||||
Serializable
|
||||
{
|
||||
/**
|
||||
* Returns -1, 0, or 1 if the UUID is less than, equal to, or greater than
|
||||
@@ -68,136 +69,16 @@ interface UuidInterface extends JsonSerializable, Serializable
|
||||
*/
|
||||
public function getFields(): FieldsInterface;
|
||||
|
||||
/**
|
||||
* @deprecated This method will be removed in 5.0.0. There is no alternative
|
||||
* recommendation, so plan accordingly.
|
||||
*/
|
||||
public function getNumberConverter(): NumberConverterInterface;
|
||||
|
||||
/**
|
||||
* Returns the hexadecimal string representation of the UUID
|
||||
*/
|
||||
public function getHex(): string;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getFieldsHex(): array;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqHiAndReserved()}.
|
||||
*/
|
||||
public function getClockSeqHiAndReservedHex(): string;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqLow()}.
|
||||
*/
|
||||
public function getClockSeqLowHex(): string;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeq()}.
|
||||
*/
|
||||
public function getClockSequenceHex(): string;
|
||||
|
||||
/**
|
||||
* @deprecated In ramsey/uuid version 5.0.0, this will be removed from the
|
||||
* interface. It is available at {@see UuidV1::getDateTime()}.
|
||||
*/
|
||||
public function getDateTime(): DateTimeInterface;
|
||||
|
||||
/**
|
||||
* Returns the integer value of the UUID as a string
|
||||
*/
|
||||
public function getInteger(): string;
|
||||
|
||||
/**
|
||||
* @deprecated This method will be removed in 5.0.0. There is no direct
|
||||
* alternative, but the same information may be obtained by splitting
|
||||
* in half the value returned by {@see UuidInterface::getHex()}.
|
||||
*/
|
||||
public function getLeastSignificantBitsHex(): string;
|
||||
|
||||
/**
|
||||
* @deprecated This method will be removed in 5.0.0. There is no direct
|
||||
* alternative, but the same information may be obtained by splitting
|
||||
* in half the value returned by {@see UuidInterface::getHex()}.
|
||||
*/
|
||||
public function getMostSignificantBitsHex(): string;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getNode()}.
|
||||
*/
|
||||
public function getNodeHex(): string;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeHiAndVersion()}.
|
||||
*/
|
||||
public function getTimeHiAndVersionHex(): string;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeLow()}.
|
||||
*/
|
||||
public function getTimeLowHex(): string;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeMid()}.
|
||||
*/
|
||||
public function getTimeMidHex(): string;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimestamp()}.
|
||||
*/
|
||||
public function getTimestampHex(): string;
|
||||
|
||||
/**
|
||||
* @deprecated In ramsey/uuid version 5.0.0, this will be removed from this
|
||||
* interface. It has moved to {@see \Ramsey\Uuid\Rfc4122\UuidInterface::getUrn()}.
|
||||
*/
|
||||
public function getUrn(): string;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVariant()}.
|
||||
*/
|
||||
public function getVariant(): ?int;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVersion()}.
|
||||
*/
|
||||
public function getVersion(): ?int;
|
||||
|
||||
/**
|
||||
* Returns a string representation of the UUID
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user