Skip to content
This repository was archived by the owner on Apr 1, 2024. It is now read-only.

Commit 47b33c4

Browse files
Update README.md
Add warning about always resolving the singleton service out of the container.
1 parent 7650574 commit 47b33c4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ You can generate a Snowflake by resolving the service out of the container and c
6262
resolve('snowflake')->id(); // (string) "5585066784854016"
6363
```
6464

65+
> **WARNING**: Do not create instances of the Snowflake service, as doing so risks generating matching keys / introducing collisions. Instead, always resolve the Snowflake singleton out of the container. You can also use the global helper method (see below).
66+
6567
Since this is a little cumbersome, the package also registers a global `snowflake()` helper method that you can use anywhere.
6668

6769
```php
@@ -125,4 +127,4 @@ If you'd like to support the development of Snowflake, then please consider [spo
125127

126128
## License
127129

128-
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
130+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

0 commit comments

Comments
 (0)