Skip to content

Commit e38f5b2

Browse files
committed
[Uid] Document NilUlid class
1 parent 765a6e0 commit e38f5b2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

components/uid.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,15 @@ following methods to create a ``Ulid`` object from it::
269269
The ``fromBinary()``, ``fromBase32()``, ``fromBase58()`` and ``fromRfc4122()``
270270
methods were introduced in Symfony 5.3.
271271

272+
There's also a special ``NilUlid`` class to represent ULID ``null`` values::
273+
274+
$ulid = new NilUlid();
275+
// equivalent to $ulid = new Ulid('00000000000000000000000000');
276+
277+
.. versionadded:: 5.4
278+
279+
The ``NilUlid`` class was introduced in Symfony 5.4.
280+
272281
Converting ULIDs
273282
~~~~~~~~~~~~~~~~
274283

0 commit comments

Comments
 (0)