PHPackages                             burak-sevinc/tournament-round-generator - 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. burak-sevinc/tournament-round-generator

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

burak-sevinc/tournament-round-generator
=======================================

A PHP library for generating tournament rounds with helpful calculations.

2.0.0(4w ago)33MITPHPPHP ^8.1

Since Jan 15Pushed 4w ago1 watchersCompare

[ Source](https://github.com/burak-sevinc/tournament-round-generator)[ Packagist](https://packagist.org/packages/burak-sevinc/tournament-round-generator)[ RSS](/packages/burak-sevinc-tournament-round-generator/feed)WikiDiscussions main Synced 3d ago

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

Tournament Round Generator
==========================

[](#tournament-round-generator)

[![Packagist](https://camo.githubusercontent.com/286de7d14a3ca73294586fd1cc7f72f40b5eac37527bcc626b4feb2be3548970/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f627572616b2d736576696e632f746f75726e616d656e742d726f756e642d67656e657261746f72)](https://packagist.org/packages/burak-sevinc/tournament-round-generator)[![Licence](https://camo.githubusercontent.com/c48bc1163f2e89cb249e2b3e130dd97705084787a84adfc4f3451f94dcc67bec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f627572616b2d736576696e632f746f75726e616d656e742d726f756e642d67656e657261746f72)](https://packagist.org/packages/burak-sevinc/tournament-round-generator)

A PHP library for generating tournament rounds with helpful calculations

Getting Started
---------------

[](#getting-started)

```
composer require burak-sevinc/tournament-round-generator
```

Usage
-----

[](#usage)

### Basic bracket skeleton

[](#basic-bracket-skeleton)

```
use BurakSevinc\TournamentRoundGenerator\SingleElimination;

$singleElimination = new SingleElimination(8);

$roundCount = $singleElimination->getRoundCount();
$roundsArr = $singleElimination->getRounds();
$matches = $singleElimination->getMatches();
$roundOne = $singleElimination->getMatchesByRoundId(1);
```

### Teams, members, and seeding

[](#teams-members-and-seeding)

```
use BurakSevinc\TournamentRoundGenerator\Member;
use BurakSevinc\TournamentRoundGenerator\SingleElimination;
use BurakSevinc\TournamentRoundGenerator\Team;

$teams = [
    new Team(1, 'Alpha', 1, [new Member(101, 'Player A')]),
    new Team(2, 'Beta', 2, [new Member(102, 'Player B')]),
    // ...
];

$bracket = SingleElimination::fromTeams($teams);
// or
$bracket = (new SingleElimination(8))->setTeams($teams);

$team = $bracket->getTeamById(1);
$members = $bracket->getMembersByTeamId(1);
$teamsInMatch = $bracket->getTeamsInMatch(1);
```

### Bracket links for frontend line drawing

[](#bracket-links-for-frontend-line-drawing)

```
$bracket->linkMatches();

$match = $bracket->getMatchById(5);
$match->getPrevMatchIds(); // [1, 2]
$match->getNextMatchId();  // 7

$feeders = $bracket->getFeederMatches(5);
$nextMatch = $bracket->getNextMatch(5);
```

Each match array includes `positionInRound`, `prevMatchIds`, and `nextMatchId` so a frontend can draw bracket connectors.

### Match URLs

[](#match-urls)

```
use BurakSevinc\TournamentRoundGenerator\Support\TemplateMatchUrlGenerator;

$bracket
    ->setMatchUrlGenerator(new TemplateMatchUrlGenerator('/tournament/match/{matchId}'))
    ->applyMatchUrls();

$url = $bracket->getMatchById(1)?->getUrl();
```

Roadmap
-------

[](#roadmap)

- Single elimination
- Double elimination
- Round Robin

Contact
-------

[](#contact)

Burak Sevinç - [X](https://twitter.com/buraksevincdev) - [LinkedIn](https://www.linkedin.com/in/buraksevinc-dev/) -

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance94

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Total

2

Last Release

28d ago

Major Versions

1.0.0 → 2.0.02026-06-07

PHP version history (2 changes)1.0.0PHP ^7.4|^8.0|^8.1

2.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/33890174?v=4)[Burak Sevinç](/maintainers/burak-sevinc)[@burak-sevinc](https://github.com/burak-sevinc)

---

Top Contributors

[![burak-sevinc](https://avatars.githubusercontent.com/u/33890174?v=4)](https://github.com/burak-sevinc "burak-sevinc (10 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/burak-sevinc-tournament-round-generator/health.svg)

```
[![Health](https://phpackages.com/badges/burak-sevinc-tournament-round-generator/health.svg)](https://phpackages.com/packages/burak-sevinc-tournament-round-generator)
```

PHPackages © 2026

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