PHPackages                             xutl/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. [Caching](/categories/caching)
4. /
5. xutl/yii2-ranking

ActiveYii2-extension[Caching](/categories/caching)

xutl/yii2-ranking
=================

The ranks extension for the Yii framework

2.0.0(9y ago)11.3k1BSD-3-ClausePHPPHP &gt;=5.4.0

Since Apr 5Pushed 9y agoCompare

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

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

yii2-ranks
==========

[](#yii2-ranks)

redis ranks

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist xutl/yii2-ranking

```

or add

```
"xutl/yii2-ranking": "~1.0.0"

```

to the require section of your `composer.json` file.

配置
--

[](#配置)

To use this extension, you have to configure the Connection class in your application configuration:

```
return [
    //....
    'components' => [
        'ranking' => [
           'class' => 'xutl\ranking\Client',
           'redis' => [
                'scheme' => 'tcp',
                'host' => '127.0.0.1',
                'port' => 6379,
                //'password' => '1984111a',
                'db' => 0
           ],
        ],
    ]
];
```

使用
--

[](#使用)

```
/** @var \xutl\ranking\Ranking $ranking */
$ranking = Yii::$app->ranking->getRankingRef('download');

$ranking->addScores(1, 2);
$ranking->addScores(2, 2);
$ranking->addScores(2, 2);
$ranking->addScores(1, 2);
$ranking->addScores(3, 2);
$ranking->addScores(3, 2);
$ranking->addScores(1, 2);
$ranking->addScores(5, 2);
$ranking->addScores(6, 2);
$ranking->addScores(7, 2);
$ranking->addScores(9, 2);
$ranking->addScores(1, 2);
$ranking->addScores(1, 2);
$rankings = $ranking->getCurrentMonthTop10(date('Ymd'), 0, 9);
print_r($rankings);
exit;
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

3324d ago

Major Versions

1.0.0 → 2.0.02017-04-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/87b658aa9d49e0c80cfc609fa2b9dc6d615672b1d895f421f751945a0e394087?d=identicon)[larvacent](/maintainers/larvacent)

---

Top Contributors

[![xutl](https://avatars.githubusercontent.com/u/20939388?v=4)](https://github.com/xutl "xutl (14 commits)")

---

Tags

rankingsredisyii2yii2yiiranks

### Embed Badge

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

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

###  Alternatives

[devgroup/yii2-tag-dependency-helper

Helper for unifying cache tag names with invalidation support in yii2

34507.4k7](/packages/devgroup-yii2-tag-dependency-helper)[lajax/yii2-asset-minifier

Runtime minification and combination of asset files.

1010.4k](/packages/lajax-yii2-asset-minifier)

PHPackages © 2026

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