Skip to content

Conversation

simivar
Copy link
Contributor

@simivar simivar commented Jul 11, 2023

  • Add tests for PHP 8.3
  • Drop support for PHP < 8.1 - PHP 8.0 is not supported for longer than 7 months
  • All Exceptions now extend PhpSnowflakeException - to help with the try { } catch ()
  • Conversion from base 10 to base 2 now uses BCMath - if ID was bigger than PHP_INT_MAX (e.g. on 32bit system) it would break
  • All files have strict types declared
  • All methods have param and return types declared
  • PHPUnit upgraded to the newest version (^10)
  • Added information about Sonyflake algorithm

Solves #52

@codecov-commenter
Copy link

codecov-commenter commented Jul 11, 2023

Codecov Report

Patch coverage: 99.18% and project coverage change: -0.44 ⚠️

Comparison is base (6a35e7d) 100.00% compared to head (1cf283f) 99.56%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@              Coverage Diff              @@
##              master      #54      +/-   ##
=============================================
- Coverage     100.00%   99.56%   -0.44%     
- Complexity        53       89      +36     
=============================================
  Files              6        7       +1     
  Lines            146      230      +84     
=============================================
+ Hits             146      229      +83     
- Misses             0        1       +1     
Impacted Files Coverage Δ
src/FileLockResolver.php 98.73% <98.73%> (ø)
src/LaravelSequenceResolver.php 100.00% <100.00%> (ø)
src/RandomSequenceResolver.php 100.00% <100.00%> (ø)
src/RedisSequenceResolver.php 100.00% <100.00%> (ø)
src/Snowflake.php 100.00% <100.00%> (ø)
src/Sonyflake.php 100.00% <100.00%> (ø)
src/SwooleSequenceResolver.php 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Owner

@godruoyi godruoyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just left a bit comments, and this is great work, thanks a lot,

@simivar
Copy link
Contributor Author

simivar commented Jul 12, 2023

@godruoyi I've addressed all the comments

Copy link
Owner

@godruoyi godruoyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @simivar, LGTM

@godruoyi godruoyi merged commit e78a729 into godruoyi:master Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants