ramsey / uuid

:snowflake: A PHP library for generating universally unique identifiers (UUIDs).
https://uuid.ramsey.dev
MIT License
12.45k stars 501 forks source link

Ramsey\Uuid\Uuid::uuid6() is not an instance of Ramsey\Uuid\Nonstandard\UuidV6 anymore #347

Open haclong opened 3 years ago

haclong commented 3 years ago

hello as said in the title, this : $uuid = Ramsey\Uuid\Uuid::uuid6() ; $uuid instanceof Ramsey\Uuid\Nonstandard\UuidV6 now returns false...

if i do get_class($uuid), i'll get : Ramsey\Uuid\Lazy\LazyUuidFromString object...

since i would prefer to be sure to have the time ordered Uuid, is it something i still can check somehow ?

ramsey commented 3 years ago

Note to me, so that these get linked together: this is related to #327.

danfoley commented 3 years ago

following this topic as well, I really want to be able to verify that a Uuid::uuid6 is an instance of Ramsey\Uuid\Nonstandard\Uuidv6 otherwise i have no of knowing that the uuid being passed is a uuid type6.