From 23f4e26d03a119db02cc687cf07329ecb59e77b8 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 16 Jul 2021 11:25:12 +0200 Subject: [PATCH] [Uid] Document NilUlid class --- components/uid.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/components/uid.rst b/components/uid.rst index d6b3692be45..44521d52176 100644 --- a/components/uid.rst +++ b/components/uid.rst @@ -269,6 +269,17 @@ following methods to create a ``Ulid`` object from it:: The ``fromBinary()``, ``fromBase32()``, ``fromBase58()`` and ``fromRfc4122()`` methods were introduced in Symfony 5.3. +There's also a special ``NilUlid`` class to represent ULID ``null`` values:: + + use Symfony\Component\Uid\NilUlid; + + $ulid = new NilUlid(); + // equivalent to $ulid = new Ulid('00000000000000000000000000'); + +.. versionadded:: 5.4 + + The ``NilUlid`` class was introduced in Symfony 5.4. + Converting ULIDs ~~~~~~~~~~~~~~~~