PHPackages                             jimchen/yii2-ranking - 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. [Framework](/categories/framework)
4. /
5. jimchen/yii2-ranking

ActiveLibrary[Framework](/categories/framework)

jimchen/yii2-ranking
====================

The ranks extension for the Yii framework

v1.1.0(5y ago)0289MITPHPCI failing

Since Aug 31Pushed 5y ago1 watchersCompare

[ Source](https://github.com/JimChenWYU/yii2-ranking)[ Packagist](https://packagist.org/packages/jimchen/yii2-ranking)[ RSS](/packages/jimchen-yii2-ranking/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

 yii2-ranking
==============

[](#-yii2-ranking-)

 The ranks extension for the Yii framework.

[![PHP Composer](https://github.com/JimChenWYU/yii2-ranking/workflows/PHP%20Composer/badge.svg)](https://github.com/JimChenWYU/yii2-ranking/workflows/PHP%20Composer/badge.svg)

Installing
----------

[](#installing)

```
$ composer require jimchen/yii2-ranking -vvv
```

Usage
-----

[](#usage)

### 配置：

[](#配置)

```
[
	'components' => [
		'ranking' => [
			'class' => \jimchen\ranking\RankingManager::class,
			'name' => 'test',
			'redis' => 'redis',
			'fetchNum' => 10,
			'rankingClasses' => [
				\jimchen\ranking\ranking\MonthlyRanking::class,
			],
		],
	],
]
```

### 初始化

[](#初始化)

```
use jimchen\ranking\ranking\MonthlyRanking;

Yii::$app->ranking->import(new YourDataSource());

$monthlyRank = Yii::$app->ranking->get(MonthlyRanking::class);

$monthlyRank->rank('john'); // 获取john的排名
$monthlyRank->score('john'); // 获取john的分数
$monthlyRank->top(10); // 获取月榜分数最高的前10
```

Contributing
------------

[](#contributing)

You can contribute in one of three ways:

1. File bug reports using the [issue tracker](https://github.com/JimChenWYU/yii2-ranking/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/JimChenWYU/yii2-ranking/issues).
3. Contribute new features or update the wiki.

*The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.*

License
-------

[](#license)

MIT

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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 ~0 days

Total

2

Last Release

2080d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/20cebafc45fd6fc5f67bf655119a3b27e9b208e248f2d7f5c98fd6c0a101485b?d=identicon)[jimchen](/maintainers/jimchen)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jimchen-yii2-ranking/health.svg)

```
[![Health](https://phpackages.com/badges/jimchen-yii2-ranking/health.svg)](https://phpackages.com/packages/jimchen-yii2-ranking)
```

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k84.2M225](/packages/laravel-horizon)[laravel/nightwatch

The official Laravel Nightwatch package.

3486.1M13](/packages/laravel-nightwatch)[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k47](/packages/skeeks-cms)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)[doppar/framework

The Doppar Framework

366.7k8](/packages/doppar-framework)[fancyecommerce/fec

fancy ecommerce

2212.0k2](/packages/fancyecommerce-fec)

PHPackages © 2026

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