PHPackages                             keliodev/glicko2 - 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. keliodev/glicko2

ActiveLibrary

keliodev/glicko2
================

A PHP implementation of glicko2 rating system

1.0.2(6y ago)039MITPHPPHP &gt;=7.1.0

Since May 2Pushed 4y agoCompare

[ Source](https://github.com/KelioDev/glicko2)[ Packagist](https://packagist.org/packages/keliodev/glicko2)[ Docs](https://github.com/laxity7/glicko2)[ RSS](/packages/keliodev-glicko2/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Glicko2 rating system
=====================

[](#glicko2-rating-system)

--------------------------------------------------------------------------------------------------------------
==============================================================================================================

[](#--------------------------------------------------------------------------------------------------------------)

It's a fork to rename the class Match into MatchGame because the work "match" is a reserved keyword in PHP 8.0
==============================================================================================================

[](#its-a-fork-to-rename-the-class-match-into-matchgame-because-the-work-match-is-a-reserved-keyword-in-php-80)

--------------------------------------------------------------------------------------------------------------
==============================================================================================================

[](#---------------------------------------------------------------------------------------------------------------1)

[![License](https://camo.githubusercontent.com/7ff10e5c6e930793002745d791c5a8122c6db9ae250ea9a26b3fdec65703b89d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c6178697479372f676c69636b6f322e737667)](https://github.com/laxity7/glicko2/blob/master/LICENSE)[![Latest Stable Version](https://camo.githubusercontent.com/428da5c9805ce6f596fdcd7e6892514c8221a562bc773e7945360ded5fd4d034/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6178697479372f676c69636b6f322e737667)](https://packagist.org/packages/laxity7/glicko2)[![Total Downloads](https://camo.githubusercontent.com/528f9e67592656721285417b2c2b3c1584c3aca41f5e8a27bebcf55704bb1fb4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6178697479372f676c69636b6f322e737667)](https://packagist.org/packages/laxity7/glicko2)

A PHP implementation of [Glicko2 rating system](http://www.glicko.net/glicko.html)

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

[](#installation)

### Composer

[](#composer)

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

Either run

```
php composer.phar require KelioDev/glicko2 "~1.0.0"

```

or add

```
"KelioDev/glicko2": "~1.0.0"

```

to the require section of your `composer.json`

Usage
-----

[](#usage)

For ease of understanding take ActiveRecord pattern.

Somewhere create object. Attribute names can be any

```
use keliodev\glicko2\Player;
// ...
public function createUserRating(int $userId)
{
    $userRating = new UserRating();
    $userRating->user_id = $userId;
    $player = new Player();
    $userRating->rating = $player->getRating();
    $userRating->rating_deviation = $player->getRatingDeviation();
    $userRating->rating_volatility = $player->getRatingVolatility();

    $userRating->insert();

    return $userRating;
}
```

Ok, let's play

```
use keliodev\glicko2\MatchGame;
use keliodev\glicko2\MatchCollection;
use keliodev\glicko2\Player;

$player1 = new Player($userRating1->rating, $userRating1->rating_deviation, $userRating1->rating_volatility);
$player2 = new Player($userRating2->rating, $userRating2->rating_deviation, $userRating2->rating_volatility);

// match chain
$match1 = new MatchGame($player1, $player2, 1, 0);
$match1->calculate();

$match2 = new MatchGame($player1, $player2, 3, 2);
$match2->calculate();

// or match collection
$matchCollection = new MatchCollection();
$matchCollection->addMatch(new MatchGame($player1, $player2, 1, 0));
$matchCollection->addMatch(new MatchGame($player1, $player2, 3, 2));
$matchCollection->calculate();

$newPlayer1Rating = $player1->getRating();
$newPlayer2Rating = $player2->getRating();

// for example, save in DB

$userRating1->rating = $player1->getRating();
$userRating1->rating_deviation = $player1->getRatingDeviation();
$userRating1->rating_volatility = $player1->getRatingVolatility();
$userRating1->update();

// similarly save the second player
```

Author
------

[](#author)

[Aleksandr Zelenin](https://github.com/zelenin/), e-mail:

[Vlad Varlamov](https://github.com/laxity7/), e-mail:

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

3

Last Release

2354d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

1.0.1PHP &gt;=7.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f67a937554a55892ac47618e9d5dc7cde569ade14a793a88bf26822725c8d88f?d=identicon)[KelioDev](/maintainers/KelioDev)

---

Top Contributors

[![KelioDev](https://avatars.githubusercontent.com/u/2682218?v=4)](https://github.com/KelioDev "KelioDev (7 commits)")[![zelenin](https://avatars.githubusercontent.com/u/1427885?v=4)](https://github.com/zelenin "zelenin (4 commits)")[![laxity7](https://avatars.githubusercontent.com/u/6792144?v=4)](https://github.com/laxity7 "laxity7 (3 commits)")[![pelmered](https://avatars.githubusercontent.com/u/680058?v=4)](https://github.com/pelmered "pelmered (3 commits)")

---

Tags

Ratingrankingglickoglicko2

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/keliodev-glicko2/health.svg)

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

###  Alternatives

[rubix/ml

A high-level machine learning and deep learning library for the PHP language.

2.2k1.4M28](/packages/rubix-ml)[kartik-v/bootstrap-star-rating

A simple yet powerful JQuery star rating plugin for Bootstrap.

1.1k4.5M5](/packages/kartik-v-bootstrap-star-rating)[gabrielbull/ups-api

PHP UPS API

4642.4M10](/packages/gabrielbull-ups-api)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[multicaret/laravel-acquaintances

This light package, with no dependencies, gives Eloquent models the ability to manage friendships (with groups), verifications, and interactions such as: Likes, favorites, votes, subscribe, follow, ..etc. And it includes advanced rating system.

851266.9k2](/packages/multicaret-laravel-acquaintances)[willvincent/laravel-rateable

Allows multiple models to be rated with a fivestar like system.

416452.0k3](/packages/willvincent-laravel-rateable)

PHPackages © 2026

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