Aggiornato Composer
This commit is contained in:
@@ -17,10 +17,8 @@ namespace Ramsey\Uuid;
|
||||
use DateTimeImmutable;
|
||||
use DateTimeInterface;
|
||||
use Ramsey\Uuid\Converter\NumberConverterInterface;
|
||||
use Ramsey\Uuid\Converter\TimeConverterInterface;
|
||||
use Ramsey\Uuid\Exception\DateTimeException;
|
||||
use Ramsey\Uuid\Exception\UnsupportedOperationException;
|
||||
use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface;
|
||||
use Throwable;
|
||||
|
||||
use function str_pad;
|
||||
@@ -32,29 +30,17 @@ use const STR_PAD_LEFT;
|
||||
* This trait encapsulates deprecated methods for ramsey/uuid; this trait and
|
||||
* its methods will be removed in ramsey/uuid 5.0.0.
|
||||
*
|
||||
* @deprecated This trait and its methods will be removed in ramsey/uuid 5.0.0.
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
trait DeprecatedUuidMethodsTrait
|
||||
{
|
||||
/**
|
||||
* @var Rfc4122FieldsInterface
|
||||
*/
|
||||
protected $fields;
|
||||
|
||||
/**
|
||||
* @var NumberConverterInterface
|
||||
*/
|
||||
protected $numberConverter;
|
||||
|
||||
/**
|
||||
* @var TimeConverterInterface
|
||||
*/
|
||||
protected $timeConverter;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface}
|
||||
* instance, you may call {@see Rfc4122FieldsInterface::getClockSeqHiAndReserved()}
|
||||
* {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqHiAndReserved()}
|
||||
* and use the arbitrary-precision math library of your choice to
|
||||
* convert it to a string integer.
|
||||
*/
|
||||
@@ -65,8 +51,9 @@ trait DeprecatedUuidMethodsTrait
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface}
|
||||
* instance, you may call {@see Rfc4122FieldsInterface::getClockSeqHiAndReserved()}.
|
||||
* {@see \Ramsey\Uuid\Fields\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
|
||||
{
|
||||
@@ -75,8 +62,9 @@ trait DeprecatedUuidMethodsTrait
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface}
|
||||
* instance, you may call {@see Rfc4122FieldsInterface::getClockSeqLow()}
|
||||
* {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqLow()}
|
||||
* and use the arbitrary-precision math library of your choice to
|
||||
* convert it to a string integer.
|
||||
*/
|
||||
@@ -87,8 +75,9 @@ trait DeprecatedUuidMethodsTrait
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface}
|
||||
* instance, you may call {@see Rfc4122FieldsInterface::getClockSeqLow()}.
|
||||
* {@see \Ramsey\Uuid\Fields\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
|
||||
{
|
||||
@@ -97,8 +86,9 @@ trait DeprecatedUuidMethodsTrait
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface}
|
||||
* instance, you may call {@see Rfc4122FieldsInterface::getClockSeq()}
|
||||
* {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeq()}
|
||||
* and use the arbitrary-precision math library of your choice to
|
||||
* convert it to a string integer.
|
||||
*/
|
||||
@@ -109,8 +99,9 @@ trait DeprecatedUuidMethodsTrait
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface}
|
||||
* instance, you may call {@see Rfc4122FieldsInterface::getClockSeq()}.
|
||||
* {@see \Ramsey\Uuid\Fields\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
|
||||
{
|
||||
@@ -157,7 +148,7 @@ trait DeprecatedUuidMethodsTrait
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance.
|
||||
* {@see \Ramsey\Uuid\Fields\FieldsInterface} instance.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
@@ -219,10 +210,11 @@ trait DeprecatedUuidMethodsTrait
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface}
|
||||
* instance, you may call {@see Rfc4122FieldsInterface::getNode()}
|
||||
* and use the arbitrary-precision math library of your choice to
|
||||
* convert it to a string integer.
|
||||
* {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getNode()} and use the
|
||||
* arbitrary-precision math library of your choice to convert it to a
|
||||
* string integer.
|
||||
*/
|
||||
public function getNode(): string
|
||||
{
|
||||
@@ -231,8 +223,9 @@ trait DeprecatedUuidMethodsTrait
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface}
|
||||
* instance, you may call {@see Rfc4122FieldsInterface::getNode()}.
|
||||
* {@see \Ramsey\Uuid\Fields\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
|
||||
{
|
||||
@@ -241,8 +234,9 @@ trait DeprecatedUuidMethodsTrait
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface}
|
||||
* instance, you may call {@see Rfc4122FieldsInterface::getTimeHiAndVersion()}
|
||||
* {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeHiAndVersion()}
|
||||
* and use the arbitrary-precision math library of your choice to
|
||||
* convert it to a string integer.
|
||||
*/
|
||||
@@ -253,8 +247,9 @@ trait DeprecatedUuidMethodsTrait
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface}
|
||||
* instance, you may call {@see Rfc4122FieldsInterface::getTimeHiAndVersion()}.
|
||||
* {@see \Ramsey\Uuid\Fields\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
|
||||
{
|
||||
@@ -263,10 +258,11 @@ trait DeprecatedUuidMethodsTrait
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface}
|
||||
* instance, you may call {@see Rfc4122FieldsInterface::getTimeLow()}
|
||||
* and use the arbitrary-precision math library of your choice to
|
||||
* convert it to a string integer.
|
||||
* {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeLow()} and use the
|
||||
* arbitrary-precision math library of your choice to convert it to a
|
||||
* string integer.
|
||||
*/
|
||||
public function getTimeLow(): string
|
||||
{
|
||||
@@ -275,8 +271,9 @@ trait DeprecatedUuidMethodsTrait
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface}
|
||||
* instance, you may call {@see Rfc4122FieldsInterface::getTimeLow()}.
|
||||
* {@see \Ramsey\Uuid\Fields\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
|
||||
{
|
||||
@@ -285,10 +282,11 @@ trait DeprecatedUuidMethodsTrait
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface}
|
||||
* instance, you may call {@see Rfc4122FieldsInterface::getTimeMid()}
|
||||
* and use the arbitrary-precision math library of your choice to
|
||||
* convert it to a string integer.
|
||||
* {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeMid()} and use the
|
||||
* arbitrary-precision math library of your choice to convert it to a
|
||||
* string integer.
|
||||
*/
|
||||
public function getTimeMid(): string
|
||||
{
|
||||
@@ -297,8 +295,9 @@ trait DeprecatedUuidMethodsTrait
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface}
|
||||
* instance, you may call {@see Rfc4122FieldsInterface::getTimeMid()}.
|
||||
* {@see \Ramsey\Uuid\Fields\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
|
||||
{
|
||||
@@ -307,10 +306,11 @@ trait DeprecatedUuidMethodsTrait
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface}
|
||||
* instance, you may call {@see Rfc4122FieldsInterface::getTimestamp()}
|
||||
* and use the arbitrary-precision math library of your choice to
|
||||
* convert it to a string integer.
|
||||
* {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimestamp()} and use
|
||||
* the arbitrary-precision math library of your choice to convert it to
|
||||
* a string integer.
|
||||
*/
|
||||
public function getTimestamp(): string
|
||||
{
|
||||
@@ -323,8 +323,9 @@ trait DeprecatedUuidMethodsTrait
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface}
|
||||
* instance, you may call {@see Rfc4122FieldsInterface::getTimestamp()}.
|
||||
* {@see \Ramsey\Uuid\Fields\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
|
||||
{
|
||||
@@ -335,20 +336,9 @@ trait DeprecatedUuidMethodsTrait
|
||||
return $this->fields->getTimestamp()->toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated This has moved to {@see Rfc4122FieldsInterface::getUrn()} and
|
||||
* is available on {@see \Ramsey\Uuid\Rfc4122\UuidV1},
|
||||
* {@see \Ramsey\Uuid\Rfc4122\UuidV3}, {@see \Ramsey\Uuid\Rfc4122\UuidV4},
|
||||
* and {@see \Ramsey\Uuid\Rfc4122\UuidV5}.
|
||||
*/
|
||||
public function getUrn(): string
|
||||
{
|
||||
return 'urn:uuid:' . $this->toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVariant()}.
|
||||
*/
|
||||
@@ -359,7 +349,7 @@ trait DeprecatedUuidMethodsTrait
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
||||
* {@see FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
||||
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVersion()}.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user