PHPackages                             lucagentile/roundrobin-scheduler - 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. lucagentile/roundrobin-scheduler

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

lucagentile/roundrobin-scheduler
================================

Utils for round-robin tournaments. Laravel ready.

59652[1 issues](https://github.com/lucagentile/roundrobin-scheduler/issues)PHP

Since Aug 18Pushed 8y agoCompare

[ Source](https://github.com/lucagentile/roundrobin-scheduler)[ Packagist](https://packagist.org/packages/lucagentile/roundrobin-scheduler)[ RSS](/packages/lucagentile-roundrobin-scheduler/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Round-robin scheduler
=====================

[](#round-robin-scheduler)

You can easily create round-robin rounds for a tournament.

Laravel ready.

There are two methods. One is **BergerAlgorithm($teams)** which takes an array of teams as argument and returns the set of matches.

Given an array of teams like:

```
['Juventus', 'Milan', 'Roma', 'Napoli', 'Inter']

```

the method returns a multilevel array, in which the first level is the game day:

```
[
    [
        ['REST', 'Juventus'], ['Inter', 'Milan'],  ['Napoli', 'Roma']
    ],
    [
        ['Juventus', 'Milan'], ['Roma', 'REST'], ['Napoli', 'Inter']
    ],
    [
        ['Roma', 'Juventus'], ['Milan', 'Napoli'], ['REST', 'Inter']
    ],
    [
        ['Juventus', 'Napoli'], ['Inter', 'Roma'], ['REST', 'Milan']
    ],
    [
        ['Inter', 'Juventus'], ['Napoli', 'REST'], ['Roma', 'Milan']
    ]
]

```

If the team count is odd, it adds a dummy team.

The other one is **distributeAmongRounds($teams, $rounds)** which takes as arguments an array of teams and the desired amount of rounds. I suggest you to shuffle() your team dataset before providing it to the function.

Given an array of teams like this and '3' as a desired amount of rounds:

```
['Milan', 'Roma', 'Juventus', 'Napoli', 'Inter', 'Lazio', 'Fiorentina', 'Udinese', 'Sampdoria', 'Genoa'],

```

the method returns a multilevel array:

```
[
    ['Genoa', 'Fiorentina', 'Napoli', 'Milan'],
    ['Sampdoria', 'Lazio', 'Juventus'],
    ['Udinese', 'Inter', 'Roma']
]

```

### Installation

[](#installation)

```
composer require lucagentile\roundrobin-scheduler

```

#### Laravel:

[](#laravel)

add the ServiceProvider class name under 'providers' in config/app.php

```
Gautile\RoundRobin\RoundRobinSchedulerServiceProvider::class

```

then add the alias under 'aliases' for the Facade

```
'RoundRobinScheduler' => Gautile\RoundRobin\Facades\RoundRobinScheduler::class,

```

### License

[](#license)

MIT

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4802220?v=4)[Luca Gentile](/maintainers/lucagentile)[@lucagentile](https://github.com/lucagentile)

---

Top Contributors

[![lucagentile](https://avatars.githubusercontent.com/u/4802220?v=4)](https://github.com/lucagentile "lucagentile (3 commits)")

### Embed Badge

![Health badge](/badges/lucagentile-roundrobin-scheduler/health.svg)

```
[![Health](https://phpackages.com/badges/lucagentile-roundrobin-scheduler/health.svg)](https://phpackages.com/packages/lucagentile-roundrobin-scheduler)
```

###  Alternatives

[tamtamchik/namecase

This package allows you to convert names into the correct case where possible.

76543.0k](/packages/tamtamchik-namecase)[wikibase/data-model

PHP implementation of the Wikibase DataModel

37244.9k23](/packages/wikibase-data-model)[denissimon/prediction-builder

A library for machine learning that builds predictions using a linear regression.

1146.7k](/packages/denissimon-prediction-builder)[symfony/json-path

Eases JSON navigation using the JSONPath syntax as described in RFC 9535

16163.4k7](/packages/symfony-json-path)[base62/base62

base62 encoder and decoder also for big numbers with Laravel integration

1610.0k](/packages/base62-base62)[redot/laravel-toastify

A simple package to use toastify.js in laravel applications

1010.1k](/packages/redot-laravel-toastify)

PHPackages © 2026

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