Releases: caneara/snowflake
Added distributed architecture flag
v2.0.6 added distributed architecture flag
Added migration methods
See the database section in the readme.
Update readme
Added a note about always resolving the singleton and not creating instances of the Snowflake service.
Creating instances risks collisions.
Fix for null values
v2.0.3 fix for null values on cast
Fix return type
v2.0.2 fix return type
Added model cast
This minor release adds an Eloquent model cast that makes it easy to convert Snowflakes between integers and strings when saving them in the database vs passing them from PHP to the front-end e.g. for JavaScript, which doesn't support 64-bit integers.
Rollback conversion to integers
This is a major release owing to a breaking change in the snowflake()
global helper. In version 1, this converted the generated string
into an integer
. While fine for PHP, some languages such as JavaScript, don't support 64-bit integers and will truncate them. In order to prevent this, Snowflakes should exist as strings (even though they are integers).
The helper now returns a string.
Initial release
Please review the readme for more details.