PHPackages                             chrgriffin/blizzard-faker - 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. chrgriffin/blizzard-faker

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

chrgriffin/blizzard-faker
=========================

PHP Faker providers for Blizzard games.

v0.1.1(7y ago)4305MITPHPPHP ^7.0

Since Nov 12Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ChrGriffin/blizzard-faker)[ Packagist](https://packagist.org/packages/chrgriffin/blizzard-faker)[ RSS](/packages/chrgriffin-blizzard-faker/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (3)Used By (0)

Blizzard Faker
==============

[](#blizzard-faker)

`blizzard-faker` is a collection of providers for [Faker](https://github.com/fzaninotto/Faker) related to Blizzard Entertainment and its games.

Requirements
------------

[](#requirements)

`blizzard-faker` requires PHP 7.0 or greater, and `fzaninotto/faker` 1.6 or greater.

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

[](#installation)

You can install via composer:

```
composer install chrgriffin/blizzard-faker

```

Usage
-----

[](#usage)

You can add a Blizzard provider to Faker the same way you would add any other:

```
use Faker\Factory;
use ChrGriffin\BlizzardFaker\Names as BlizzardNames;

$faker = Factory::create();
$faker->addProvider(new BlizzardNames($faker));
```

Once added, you can immediately make use of the provider methods as you normally would:

```
$name = $faker->name();
```

However, `blizzard-faker` offers additional filtering functionality:

```
$orcName = $faker
    ->blizzardNames() // this line prevents conflict with other Blizzard providers
    ->orc()
    ->name();
```

These filters are additive and chainable, meaning if you want a human *or* terran name from Diablo, Starcraft, *or* Warcraft, you can write:

```
$name = $faker
    ->blizzardNames()
    ->diablo()
    ->starcraft()
    ->warcraft()
    ->human()
    ->terran()
    ->name();
```

Providers
---------

[](#providers)

### `ChrGriffin\BlizzardFaker\Names`

[](#chrgriffinblizzardfakernames)

#### Valid Franchises

[](#valid-franchises)

The Names provider is valid across all Blizzard franchises.

#### Available Methods and Arguments

[](#available-methods-and-arguments)

- `blizzardNames() : ChrGriffin\BlizzardFaker\Names` *(prevents conflict with other providers)*
- `firstName($gender, $franchise) : string`
    - `$gender`: 'male', 'female', or `null` (any)
    - `$franchise`: a camelcased string of a valid franchise, or `null` (any)
- `lastName($gender, $franchise) : string`
    - `$gender`: 'male', 'female', or `null` (any)
    - `$franchise`: a camelcased string of a valid franchise, or `null` (any)
- `fullName($gender, $franchise) : string`
    - `$gender`: 'male', 'female', or `null` (any)
    - `$franchise`: a camelcased string of a valid franchise, or `null` (any)
- `name($type, $gender, $franchise) : string`
    - `$type`: 'first', 'last', 'full', or `null` ('full')
    - `$gender`: 'male', 'female', or `null` (any)
    - `$franchise`: a camelcased string of a valid franchise, or `null` (any)

### `ChrGriffin\BlizzardFaker\Monsters`

[](#chrgriffinblizzardfakermonsters)

#### Valid Franchises

[](#valid-franchises-1)

The Monsters provider is only valid with the Diablo franchise.

#### Available Methods and Arguments

[](#available-methods-and-arguments-1)

- `blizzardMonsters() : ChrGriffin\BlizzardFaker\Monsters` *(prevents conflict with other providers)*
- `monster($franchise) : string`
    - `$franchise`: a camelcased string of a valid franchise, or `null` (any)

Filters
-------

[](#filters)

After directly calling a provider, you can apply various filters to it before retrieving your data.

Note that not all filters are compatible with all providers, or with each other. Simply apply common sense and you should be fine.

If a filter is applied to an incompatible provider or pre-existing set of filters, it will throw a `ChrGriffin\BlizzardFaker\Invalid{Filter}Exception`. For example, the following code:

```
$faker
    ->blizzardNames()
    ->starcraft()
    ->orc();
```

will throw a `ChrGriffin\BlizzardFaker\InvalidRaceException`.

### Franchise Filter

[](#franchise-filter)

You can filter by the following franchises:

- `->diablo()`
- `->hearthstone()`
- `->heroesOfTheStorm()`
- `->starcraft()`
- `->warcraft()`

### Race Filter

[](#race-filter)

You can filter by the following races:

- `->angel()`
- `->bloodElf()`
- `->demon()`
- `->draenei()`
- `->dragon()`
- `->dwarf()`
- `->elemental()`
- `->forsaken()` *(has a lot of, though not 100%, overlap with `undead`)*
- `->gnome()`
- `->goblin()`
- `->human()`
- `->human()`
- `->murloc()`
- `->nephalem()`
- `->nightElf()`
- `->orc()`
- `->pandaren()`
- `->primalZerg()`
- `->protoss()`
- `->tauren()`
- `->terran()`
- `->troll()`
- `->undead()` *(has a lot of, though not 100%, overlap with `forsaken`)*
- `->worgen()`
- `->xelNaga()`
- `->zerg()`

Roadmap
-------

[](#roadmap)

- include Overwatch franchise
- Class (ie Paladin, Warlock, etc.) provider for Diablo, Hearthstone, Warcraft
- Ability provider for all franchises
- Investigate feasibility of icon/image provider

Under the Hood
--------------

[](#under-the-hood)

A cursory investigation of the `src` directory will reveal a distinctly different structure than Faker itself.

In most cases, rather than an individual provider containing a few arrays and selecting an element at random, instead it calls upon multiple - sometimes nested - `DataProvider` classes to provide an array of random data. This is to facilitate the enormous amount of filtering that is possible without overly impacting performance; rather than filtering a single enormous array containing data spanning Blizzard's entire product line, instead we can select only a single `DataProvider` and then apply our filtering to *that*.

In addition to the various ways data can be filtered, there are also built-in 'rules' for returning data for some of the providers:

- `ChrGriffin\BlizzardFaker\Names`:

    - **Lore Character Names**: Significant lore characters will not have their names broken up to be randomly assigned, instead, if returned, it will always be their full, unaltered name. For example, 'Garrosh' can never be assigned a random orcish surname - when retrieving full names, it will *always* be 'Garrosh Hellscream' (or simply 'Garrosh' if requesting only first names).
    - **Lore Character Last Names**: If a significant lore character has a last name also carried by other characters - for example, a family name, such as 'Cain', or tribe name, such as 'Bloodhoof' - then the last name can be randomly assigned like any other. If they are the only instance of such a name, then the above rule is observed.
    - **Races Without Surnames**: There are some examples of races without surnames, such as Draenei or Protoss. In these cases, their individual name is considered a valid value for either full names *or* first names: so you may see 'Tassadar' when requesting either first *or* full names. In the case of significant lore characters with a relevant title, the character plus their title can be returned as the full name (for example, 'Hierarch Artanis', or 'Tyrael, Archangel of Justice'.)
- `ChrGriffin\BlizzardFaker\Monsters`:

    - **Monster Name Generation**: This provider follows the format of Diablo 2's random named monsters: a random prefix, suffix, and apellation will be combined to create a monster name.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Total

2

Last Release

2729d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/90b61f51551a66c90c131f873fb94ee87a064cb72dc178d8512e90e13dc769e6?d=identicon)[ChrGriffin](/maintainers/ChrGriffin)

---

Top Contributors

[![ChrGriffin](https://avatars.githubusercontent.com/u/10466686?v=4)](https://github.com/ChrGriffin "ChrGriffin (24 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/chrgriffin-blizzard-faker/health.svg)

```
[![Health](https://phpackages.com/badges/chrgriffin-blizzard-faker/health.svg)](https://phpackages.com/packages/chrgriffin-blizzard-faker)
```

###  Alternatives

[digilist/snakedumper

5045.5k](/packages/digilist-snakedumper)[cinghie/yii2-traits

Yii2 Traits

116.9k8](/packages/cinghie-yii2-traits)[emanueleminotto/faker-service-provider

Faker Service Provider for Silex

162.9k](/packages/emanueleminotto-faker-service-provider)[flowpack/nodegenerator

Random nodes generator for Neos CMS

122.1k](/packages/flowpack-nodegenerator)[prewk/xml-faker

Create random XML with the help of fzaniotto/Faker.

101.8k3](/packages/prewk-xml-faker)

PHPackages © 2026

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