Update dependency ramsey/uuid to v4 #18
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^3.5->^4.0Release Notes
ramsey/uuid (ramsey/uuid)
v4.7.4Compare Source
Fixed
^0.11.Stringableinterface toUuidInterface.OrderedTimeCodecreported in#494.
v4.7.3Compare Source
Fixed
have replaced the 4.7.2 tag with a new tag that points to the correct commit,
but I am creating this tag to help notify users and automated processes who
might have already updated to the bad 4.7.2 tag.
v4.7.2Compare Source
Fixed
Uuid::isValid()to prevent incorrect typeinference (#486).
a commit in the 5.x branch.
v4.7.1Compare Source
Fixed
v4.7.0Compare Source
Added
Uuid::fromHexadecimal()andUuidFactory::fromHexadecimal(). Thesemethods are not required by the interfaces.
Fixed
00:00:00:00:00:00).v4.6.0Compare Source
Added
[draft-ietf-uuidrev-rfc4122bis-00, section 5.8][version8]. While still an
Internet-Draft, version 8 is stable and unlikely to change in any way that
breaks compatibility.
Ramsey\Uuid\Uuid::uuid8()to generate version 8 UUIDs.Ramsey\Uuid\Rfc4122\UuidV8.Ramsey\Uuid\Uuid::UUID_TYPE_CUSTOMexists for version 8 UUIDs.Fixed
v4.5.1Compare Source
Fixed
v4.5.0Compare Source
Added
Nonstandardnamespace tothe
Rfc4122namespace. Version 6 UUIDs are defined in[draft-ietf-uuidrev-rfc4122bis-00, section 5.6][version6]. While still an
Internet-Draft version 6 is stable and unlikely to change in any way that
breaks compatibility.
[draft-ietf-uuidrev-rfc4122bis-00, section 5.7][version7]. While still an
Internet-Draft, version 7 is stable and unlikely to change in any way that
breaks compatibility.
Ramsey\Uuid\Uuid::uuid7()to generate version 7 UUIDs.Ramsey\Uuid\Rfc4122\UuidV7.Ramsey\Uuid\Uuid::UUID_TYPE_UNIX_TIMEexists for version7 UUIDs.
Ramsey\Uuid\Converter\Time\UnixTimeConverterandRamsey\Uuid\Generator\UnixTimeGeneratorto support version 7 UUID generation.Ramsey\Uuid\Uuid::MAXandRamsey\Uuid\Rfc4122\MaxUuid.Changed
^0.8.8.Deprecated
The following will be removed in ramsey/uuid 5.0.0:
Ramsey\Uuid\Nonstandard\UuidV6is deprecated in favor ofRamsey\Uuid\Rfc4122\UuidV6.Ramsey\Uuid\Uuid::UUID_TYPE_PEABODY; useRamsey\Uuid\Uuid::UUID_TYPE_REORDERED_TIMEinstead.Fixed
Ramsey\Uuid\Uuid::isValid(), Psalm now asserts the UUID is anon-empty-string when it is valid.
getVariant()nowreturns a
2when called on a nil UUID.v4.4.0Compare Source
Changed
UuidInterface::getUrn().v4.3.1Compare Source
Deprecated
The following will be removed in ramsey/uuid 5.0.0:
Ramsey\Uuid\Generator\RandomLibAdapterv4.3.0Compare Source
Changed
Composer will do the right thing for your environment and select a compatible
version of this library.
ext-ctypeextension. For applications that run in environments wherethe
ext-ctypeis not present, please require a polyfill, such assymfony/polyfill-ctype.
iterable<UuidBuilderInterface>instead ofBuilderCollectiontypes.iterable<NodeProviderInterface>instead ofNodeProviderCollectiontypes.Deprecated
The following will be removed in ramsey/uuid 5.0.0:
Ramsey\Uuid\Builder\BuilderCollectionRamsey\Uuid\Provider\Node\NodeProviderCollectionFixed
LazyUuidFromString.v4.2.3Compare Source
Fixed
^8.0in the PHP version requirement.v4.2.2Compare Source
Fixed
~8.1.0to prevent installations on 8.2until the library is ready.
v4.2.1Compare Source
Fixed
Uuid::fromString()signature. The change fromstringtonon-empty-stringon the parameter annotation introduced aBC break for those using static analysis tools. This release reverts this
change and provides an assertion to guard against empty strings.
See ramsey/uuid#383.
v4.2.0Compare Source
Added
Ramsey\Uuid\Exception\UuidExceptionInterfacefor all ramsey/uuidexceptions to implement. See ramsey/uuid#340.
Fixed
See ramsey/uuid#361.
v4.1.3Compare Source
Fixed
^8.0in the PHP version requirement.v4.1.2Compare Source
Fixed
~8.0.0to indicate it does not support PHP 8.1.v4.1.1Compare Source
Fixed
v4.1.0Compare Source
Changed
Uuid::fromString(),Uuid::fromBytes(),UuidInterface#toString(), andUuidInterface#getBytes(). See PR#324 for more information.
v4.0.3Compare Source
Fixed
^8.0in the PHP version requirement.v4.0.2Compare Source
Fixed
~8.0.0to indicate it does not support PHP 8.1.v4.0.1Compare Source
Fixed
allowed_classesbeingset to
false. For details, see ramsey/uuid#303and ramsey/collection#47.
v4.0.0Compare Source
Added
including the static method
Uuid::uuid6(), which returns aNonstandard\UuidV6instance.method
Uuid::uuid2(), which returns anRfc4122\UuidV2instance.UUIDs or creating UUIDs from existing strings, bytes, or integers, if the UUID
is an RFC 4122 variant, one of these instances will be returned:
Rfc4122\UuidV1Rfc4122\UuidV2Rfc4122\UuidV3Rfc4122\UuidV4Rfc4122\UuidV5Rfc4122\NilUuid(non-RFC 4122 variant) UUIDs:
Nonstandard\UuidV6Guid\GuidNonstandard\UuidUuid::fromDateTime()to create version 1 UUIDs from instances of\DateTimeInterface.\DateTimeInterfaceinstance returned byUuidInterface::getDateTime()(and now
Rfc4122\UuidV1::getDateTime()) now includes microseconds, asspecified by the version 1 UUID.
Validator\ValidatorInterfaceandValidator\GenericValidatorto allowflexibility in validating UUIDs/GUIDs.
relaxed validation pattern found in the 3.x series of ramsey/uuid.
Rfc4122\Validatorthat may be used for strict validation ofRFC 4122 UUID strings.
UuidthroughFeatureSet::setValidator().getValidator()andsetValidator()toUuidFactory.Provider\Node\StaticNodeProviderto assist in setting a custom staticnode value with the multicast bit set for version 1 UUIDs.
Exception\BuilderNotFoundException-Thrown to indicate that no suitable UUID builder could be found.
Exception\DateTimeException-Thrown to indicate that the PHP DateTime extension encountered an
exception/error.
Exception\DceSecurityException-Thrown to indicate an exception occurred while dealing with DCE Security
(version 2) UUIDs.
Exception\InvalidArgumentException-Thrown to indicate that the argument received is not valid. This extends the
built-in PHP
\InvalidArgumentException, so there should be no BC breakswith ramsey/uuid throwing this exception, if you are catching the PHP
exception.
Exception\InvalidBytesException-Thrown to indicate that the bytes being operated on are invalid in some way.
Exception\NameException-Thrown to indicate that an error occurred while attempting to hash a
namespace and name.
Exception\NodeException-Throw to indicate that attempting to fetch or create a node ID encountered
an error.
Exception\RandomSourceException-Thrown to indicate that the source of random data encountered an error.
Exception\TimeSourceException-Thrown to indicate that the source of time encountered an error.
Exception\UnableToBuildUuidException-Thrown to indicate a builder is unable to build a UUID.
Builder\FallbackBuilder, used byFeatureSetto help decidewhether to return a
UuidorNonstandard\Uuidwhen decoding aUUID string or bytes.
Rfc4122\UuidInterfaceto specifically represent RFC 4122 variant UUIDs.Rfc4122\UuidBuilderto build RFC 4122 variant UUIDs. This replaces theexisting
Builder\DefaultUuidBuilder, which is now deprecated.Math\CalculatorInterfacefor representing calculators to performarithmetic operations on integers.
Math\BrickMathCalculator, which is the default calculator used by thislibrary when math cannot be performed in native PHP due to integer size
limitations. The calculator is configurable and may be changed, if desired.
Converter\Number\GenericNumberConverterandConverter\Time\GenericTimeConverterwhich will use the calculator providedto convert numbers and time to values for UUIDs.
Type\Hexadecimal,Type\Integer,Type\Decimal, andType\Timefor improved type-safety when dealing with arbitrary string values.
Type\TypeInterfacethat each of the ramsey/uuid types implements.Fields\FieldsInterfaceandRfc4122\FieldsInterfaceto definefield layouts for UUID variants. The implementations
Rfc4122\Fields,Guid\Fields, andNonstandard\Fieldsstore the 16-byte,binary string representation of the UUID internally, and these manage
conversion of the binary string into the hexadecimal field values.
Builder\BuilderCollectionandProvider\Node\NodeProviderCollection.These are typed collections for providing builders and node providers to
Builder\FallbackBuilderandProvider\Node\FallbackNodeProvider, respectively.Generator\NameGeneratorInterfaceto support alternate methods ofgenerating bytes for version 3 and version 5 name-based UUID. By default,
ramsey/uuid uses the
Generator\DefaultNameGenerator, which uses the standardalgorithm this library has used since the beginning. You may choose to use the
new
Generator\PeclUuidNameGeneratorto make use of the newuuid_generate_md5()anduuid_generate_sha1()functions inext-uuid version 1.1.0.
Changed
functionality.
types. This should not cause any BC breaks if typehints target
UuidInterface:Uuid::uuid1returnsRfc4122\UuidV1Uuid::uuid3returnsRfc4122\UuidV3Uuid::uuid4returnsRfc4122\UuidV4Uuid::uuid5returnsRfc4122\UuidV5Type\Hexadecimalfor the$nodeparameter forUuidFactoryInterface::uuid1(). This is in addition to theint|stringtypesalready accepted, so there are no BC breaks.
Type\Hexadecimalis now therecommended type to pass for
$node.Uuid::fromString(),Uuid::fromBytes(), andUuid::fromInteger()will now return either anRfc4122\UuidInterfaceinstance or an instance of
Nonstandard\Uuid, depending on whether the inputcontains an RFC 4122 variant UUID with a valid version identifier. Both
implement
UuidInterface, so BC breaks should not occur if typehints use theinterface.
Uuid::getFields()to return an instance ofFields\FieldsInterface.Previously, it returned an array of integer values (on 64-bit systems only).
Uuid::getDateTime()now returns an instance of\DateTimeImmutableinsteadof
\DateTime.UuidInterface:getHex()now returns aType\Hexadecimalinstance.getInteger()now returns aType\Integerinstance. TheType\Integerinstance holds a string representation of a 128-bit integer. You may then
use a math library of your choice (bcmath, gmp, etc.) to operate on the
string integer.
getDateTime()now returns\DateTimeInterfaceinstead of\DateTime.__toString()method.getFields()method. It returns an instance ofFields\FieldsInterface.UuidFactoryInterface:uuid2()uuid6()fromDateTime()fromInteger()getValidator()result in BC breaks, since the new exceptions extend from built-in PHP
exceptions that this library previously threw.
Exception\UnsupportedOperationExceptionis now descended from\LogicException. Previously, it descended from\RuntimeException.Uuid:Uuidfromarray $fieldstoRfc4122\FieldsInterface $fields.Converter\TimeConverterInterface $timeConverteras the fourthrequired constructor parameter for
Uuid.Builder\UuidBuilderInterface::build()from
array $fieldstostring $bytes. Rather than accepting an array ofhexadecimal strings as UUID fields, the
build()method now expects a bytestring.
Converter\TimeConverterInterface $timeConverteras the second requiredconstructor parameter for
Rfc4122\UuidBuilder. This also affects thenow-deprecated
Builder\DefaultUuidBuilder, since this class now inheritsfrom
Rfc4122\UuidBuilder.convertTime()method toConverter\TimeConverterInterface.getTime()method toProvider\TimeProviderInterface. It replaces thecurrentTime()method.Provider\Node\FallbackNodeProvidernow accepts only aProvider\Node\NodeProviderCollectionas its constructor parameter.Provider\Time\FixedTimeProviderno longer accepts an array but accepts onlyType\Timeinstances.Provider\NodeProviderInterface::getNode()now returnsType\Hexadecimalinstead of
string|false|null.Converter/TimeConverterInterface::calculateTime()now returnsType\Hexadecimalinstead ofarray. The value is the full UUID timestampvalue (count of 100-nanosecond intervals since the Gregorian calendar epoch)
in hexadecimal format.
NumberConverterInterfaceto accept and return string valuesinstead of
mixed; this simplifies the interface and makes it consistent.Generator\DefaultTimeGeneratorno longer adds the variant and version bitsto the bytes it returns. These must be applied to the bytes afterwards.
OrderedTimeCodecnow checkswhether the UUID is an RFC 4122 variant, version 1 UUID. If not, it will throw
an exception—
InvalidArgumentExceptionwhen usingOrderedTimeCodec::encodeBinary()andUnsupportedOperationExceptionwhenusing
OrderedTimeCodec::decodeBytes().Deprecated
The following functionality is deprecated and will be removed in ramsey/uuid
5.0.0.
UuidInterfaceandUuidare deprecated. Use theircounterparts on the
Rfc4122\FieldsInterfacereturned byUuid::getFields().getClockSeqHiAndReservedHex()getClockSeqLowHex()getClockSequenceHex()getFieldsHex()getNodeHex()getTimeHiAndVersionHex()getTimeLowHex()getTimeMidHex()getTimestampHex()getVariant()getVersion()Uuidare deprecated. Use theRfc4122\FieldsInterfaceinstance returned by
Uuid::getFields()to get theType\Hexadecimalvaluefor these fields. You may use the new
Math\CalculatorInterface::toIntegerValue()method to convert the
Type\Hexadecimalinstances to instances ofType\Integer. This library providesMath\BrickMathCalculator, which may beused for this purpose, or you may use the arbitrary-precision arithemetic
library of your choice.
getClockSeqHiAndReserved()getClockSeqLow()getClockSequence()getNode()getTimeHiAndVersion()getTimeLow()getTimeMid()getTimestamp()getDateTime()onUuidInterfaceandUuidis deprecated. Use this methodonly on instances of
Rfc4122\UuidV1orNonstandard\UuidV6.getUrn()onUuidInterfaceandUuidis deprecated. It is available onRfc4122\UuidInterfaceand classes that implement it.you may obtain the same information by calling
UuidInterface::getHex()andsplitting the return value in half.
UuidInterface::getLeastSignificantBitsHex()UuidInterface::getMostSignificantBitsHex()Uuid::getLeastSignificantBitsHex()Uuid::getMostSignificantBitsHex()Uuid::getLeastSignificantBits()Uuid::getMostSignificantBits()UuidInterface::getNumberConverter()andUuid::getNumberConverter()aredeprecated. There is no alternative recommendation, so plan accordingly.
Builder\DefaultUuidBuilderis deprecated; transition toRfc4122\UuidBuilder.Converter\Number\BigNumberConverteris deprecated; transition toConverter\Number\GenericNumberConverter.Converter\Time\BigNumberTimeConverteris deprecated; transition toConverter\Time\GenericTimeConverter.These are no longer necessary; this library now behaves the same on 32-bit and
64-bit systems.
Builder\DegradedUuidBuilderConverter\Number\DegradedNumberConverterConverter\Time\DegradedTimeConverterDegradedUuidUuid::UUID_TYPE_IDENTIFIERconstant is deprecated. UseUuid::UUID_TYPE_DCE_SECURITYinstead.Uuid::VALID_PATTERNconstant is deprecated. UseValidator\GenericValidator::getPattern()orRfc4122\Validator::getPattern()instead.
Removed
Generator\RandomBytesGeneratoras a suitable replacement:Generator\MtRandGeneratorGenerator\OpenSslGeneratorGenerator\SodiumRandomGeneratorException\UnsatisfiedDependencyException. This library no longerthrows this exception.
Provider\TimeProviderInterface::currentTime(). UseProvider\TimeProviderInterface::getTime()instead.v3.9.7Compare Source
Fixed
#[ReturnTypeWillChange]toUuid::jsonSerialize()method.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.