PHPackages                             avantar/bracket-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. avantar/bracket-generator

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

avantar/bracket-generator
=========================

Simple Bracket Generator

0.1.1(5y ago)115MITPHPPHP &gt;=7.4.0

Since Dec 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/AvantaR/bracket-generator)[ Packagist](https://packagist.org/packages/avantar/bracket-generator)[ RSS](/packages/avantar-bracket-generator/feed)WikiDiscussions main Synced 3w ago

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

bracket-generator
=================

[](#bracket-generator)

Simple Bracket Generator

[![](https://github.com/avantar/bracket-generator/workflows/build/badge.svg)](https://github.com/AvantaR/bracket-generator/actions)[![codecov](https://camo.githubusercontent.com/542b7fc00e96284e01732759d322f1e4bb87baac73d8dbb8e792fea9b3bbebc1/68747470733a2f2f636f6465636f762e696f2f67682f4176616e7461522f627261636b65742d67656e657261746f722f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d5041444d4a574751434b)](https://codecov.io/gh/AvantaR/bracket-generator)[![Maintainability](https://camo.githubusercontent.com/84fc8e56ed831b56e3ecce199644d7d9f09c8adb2372e09ece11e6e59f7ef4d3/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f39336334663537636430396462336339326335662f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/AvantaR/bracket-generator/maintainability)

### Requirements:

[](#requirements)

1. PHP 7.4+

### How to use:

[](#how-to-use)

1. Create new instance of the Bracket Generator:

```
$generator = new \BracketGenerator\Generator();
```

2. Use the `generate` method to get array with bracket games. You need to pass the number of tournament participants:

```
$generator->generate(8);
```

3. You should get an array of games:

```
[
    [
        'id' => 1,
        'round' => 1,
        'game_in_round' => 1,
        'next_game_id' => 5
    ],
    [
        'id' => 2,
        'round' => 1,
        'game_in_round' => 2,
        'next_game_id' => 5
    ],
    [
        'id' => 3,
        'round' => 1,
        'game_in_round' => 3,
        'next_game_id' => 6
    ],
    [
        'id' => 4,
        'round' => 1,
        'game_in_round' => 4,
        'next_game_id' => 6
    ],
    [
        'id' => 5,
        'round' => 2,
        'game_in_round' => 1,
        'next_game_id' => 7
    ],
    [
        'id' => 6,
        'round' => 2,
        'game_in_round' => 2,
        'next_game_id' => 7
    ],
    [
        'id' => 7,
        'round' => 3,
        'game_in_round' => 1,
        'next_game_id' => null
    ],
];
```

For now, the library is able to generate only a single elimination bracket. Feel free to contribute. Thanks!

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Total

2

Last Release

2009d ago

### Community

Maintainers

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

---

Top Contributors

[![AvantaR](https://avatars.githubusercontent.com/u/1866378?v=4)](https://github.com/AvantaR "AvantaR (28 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/avantar-bracket-generator/health.svg)

```
[![Health](https://phpackages.com/badges/avantar-bracket-generator/health.svg)](https://phpackages.com/packages/avantar-bracket-generator)
```

###  Alternatives

[sylius/inventory-bundle

Flexible inventory management for Symfony applications.

19189.5k6](/packages/sylius-inventory-bundle)

PHPackages © 2026

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