PHPackages                             tangwei/snowflake - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tangwei/snowflake

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tangwei/snowflake
=================

hyperf snowflake heartbeat

v1.0.5(4mo ago)1508↓50%MITPHPPHP &gt;=8.0

Since Jun 12Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/tw2066/snowflake)[ Packagist](https://packagist.org/packages/tangwei/snowflake)[ RSS](/packages/tangwei-snowflake/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (7)Used By (0)

PHP hyperf snowflake
====================

[](#php-hyperf-snowflake)

- 基于`hyperf/snowflake`组件，增强了`工作机器ID`的维护(心跳检查和判重)
- 避免不同进程`工作机器ID`相同的情况

安装
--

[](#安装)

```
composer require tangwei/snowflake

```

说明
--

[](#说明)

```
redis的hyperf:snowflake:workerId值是自增

例:不同进程值等于1或962时

根据算法
生成出来的 workerId 和 dataCenterId 相同，都等于1和0

即:有可能产生重复ID

```

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance75

Regular maintenance activity

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~113 days

Recently: every ~141 days

Total

6

Last Release

137d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.1

v1.0.3PHP &gt;=8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/24579418?v=4)[Mr.tang](/maintainers/tw2066)[@tw2066](https://github.com/tw2066)

---

Top Contributors

[![tw2066](https://avatars.githubusercontent.com/u/24579418?v=4)](https://github.com/tw2066 "tw2066 (10 commits)")

---

Tags

snowflakesnowflake heartbeat

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tangwei-snowflake/health.svg)

```
[![Health](https://phpackages.com/badges/tangwei-snowflake/health.svg)](https://phpackages.com/packages/tangwei-snowflake)
```

###  Alternatives

[kra8/laravel-snowflake

Snowflake for Laravel and Lumen.

188402.3k6](/packages/kra8-laravel-snowflake)[hyperf/snowflake

A snowflake library

25808.0k59](/packages/hyperf-snowflake)[identifier/identifier

Common Interfaces and Factories for Identifiers

3226.2k1](/packages/identifier-identifier)[wantp/snowflake

A package for create unique id by snowflake

399.5k1](/packages/wantp-snowflake)[ramsey/identifier

A PHP library for generating and working with identifiers, including UUIDs, ULIDs, and Snowflakes

603.0k1](/packages/ramsey-identifier)[hafael/laraflake

Laravel Package based on Twitter Snowflake ID Generator (64 bit ID).

287.9k1](/packages/hafael-laraflake)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
