Skip to content

Commit c429fdf

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [Uid] Document NilUlid class
2 parents 95f7fc9 + 5130906 commit c429fdf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

components/uid.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,13 @@ following methods to create a ``Ulid`` object from it::
241241
$ulid = Ulid::fromBase58('1BKocMc5BnrVcuq2ti4Eqm');
242242
$ulid = Ulid::fromRfc4122('0171069d-593d-97d3-8b3e-23d06de5b308');
243243

244+
There's also a special ``NilUlid`` class to represent ULID ``null`` values::
245+
246+
use Symfony\Component\Uid\NilUlid;
247+
248+
$ulid = new NilUlid();
249+
// equivalent to $ulid = new Ulid('00000000000000000000000000');
250+
244251
Converting ULIDs
245252
~~~~~~~~~~~~~~~~
246253

0 commit comments

Comments
 (0)