Skip to content

Commit 5130906

Browse files
committed
minor #15528 [Uid] Document NilUlid class (javiereguiluz)
This PR was squashed before being merged into the 5.4 branch. Discussion ---------- [Uid] Document NilUlid class Fixes #15469. Commits ------- 23f4e26 [Uid] Document NilUlid class
2 parents 6144e6a + 23f4e26 commit 5130906

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

components/uid.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,17 @@ 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+
use Symfony\Component\Uid\NilUlid;
275+
276+
$ulid = new NilUlid();
277+
// equivalent to $ulid = new Ulid('00000000000000000000000000');
278+
279+
.. versionadded:: 5.4
280+
281+
The ``NilUlid`` class was introduced in Symfony 5.4.
282+
272283
Converting ULIDs
273284
~~~~~~~~~~~~~~~~
274285

0 commit comments

Comments
 (0)