PHPackages                             geekish/faker-horse-battery-staple - 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. geekish/faker-horse-battery-staple

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

geekish/faker-horse-battery-staple
==================================

Correct Horse Battery Staple password provider for Faker

3.0(1mo ago)322MITPHPPHP ^8.0CI passing

Since Nov 14Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/geekish/faker-horse-battery-staple)[ Packagist](https://packagist.org/packages/geekish/faker-horse-battery-staple)[ Docs](https://github.com/geekish/faker-horse-battery-staple)[ RSS](/packages/geekish-faker-horse-battery-staple/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (7)Versions (5)Used By (0)

faker-horse-battery-staple
==========================

[](#faker-horse-battery-staple)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d27d277d40f45946b78d21af191ef14741364a4acfdb6c2cbf496a283b795709/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6765656b6973682f66616b65722d686f7273652d626174746572792d737461706c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/geekish/faker-horse-battery-staple)[![Total Downloads](https://camo.githubusercontent.com/85acb7594611b49af3d3d71f2302fe242256d688a3e78fb7c2ff56c63ee9eff5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6765656b6973682f66616b65722d686f7273652d626174746572792d737461706c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/geekish/faker-horse-battery-staple)

Generate correct-horse-battery-staple passwords with [Faker](https://github.com/FakerPHP/Faker). Uses a modified version of the [10000 words list](https://github.com/first20hours/google-10000-english).

This package is intended to be used for testing purposes only. The CHBS is indeed a good method to use to generate passwords, but there are plenty of other tools like [correcthorsebatterystaple.net](https://correcthorsebatterystaple.net) that you can use.

[![XKCD comic](https://camo.githubusercontent.com/f6697f2639515d1582b2724617468cfc6b1772888503ff2d21619f053d1e4435/687474703a2f2f696d67732e786b63642e636f6d2f636f6d6963732f70617373776f72645f737472656e6774682e706e67)](https://camo.githubusercontent.com/f6697f2639515d1582b2724617468cfc6b1772888503ff2d21619f053d1e4435/687474703a2f2f696d67732e786b63642e636f6d2f636f6d6963732f70617373776f72645f737472656e6774682e706e67)

Install
-------

[](#install)

Via Composer

```
composer require geekish/faker-horse-battery-staple
```

Usage
-----

[](#usage)

Add the provider:

```
use Faker\Generator;
use Geekish\FakerHorseBatteryStaple\BatteryStapleProvider;

$faker = new Generator();
$faker->addProvider(new BatteryStapleProvider($faker));
```

Without any arguments, a random 3-word password is generated with no delimiter (character(s) separating words); e.g. correcthorsebattery.

```
echo $faker->correctHorseBatteryStaple;
```

To specify delimiter, e.g. (correct.horse.battery):

```
echo $faker->correctHorseBatteryStaple(delimiter: '.');
```

There isn't a character limit so if you really want to, you can do something like:

```
echo $faker->correctHorseBatteryStaple(delimiter: '!@#$%^&*');
```

But I'm not sure *why* you would want to do that.

To specify number of words:

```
echo $faker->correctHorseBatteryStaple(words: 7);
```

Again, no limit, but 3+ is best.

To capitalize a random word:

```
echo $faker->correctHorseBatteryStaple(capitalize: true);
```

All arguments, with their default values:

```
echo $faker->correctHorseBatteryStaple(
  delimiter: '',
  words: 3,
  capitalize: false
);
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Hannah Chartier](https://github.com/geekish)
- [Matt](https://github.com/matt-allan) for the [package](https://matt-allan/battery-staple) upon which this was originally built.
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance93

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity71

Established project with proven stability

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

Total

3

Last Release

36d ago

Major Versions

1.0 → 2.02020-12-20

2.0 → 3.02026-05-28

PHP version history (3 changes)1.0PHP ^5.6|^7.0

2.0PHP ^7.1|^8.0

3.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f71f88eade469052b3394beb105edf22d815cd1449a90bb28ce94eccbd51740?d=identicon)[hannahwarmbier](/maintainers/hannahwarmbier)

---

Top Contributors

[![geekish](https://avatars.githubusercontent.com/u/684339?v=4)](https://github.com/geekish "geekish (18 commits)")

---

Tags

correct-horse-battery-staplefakerfaker-providerphpfakerpasswordcorrect horse battery staple

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/geekish-faker-horse-battery-staple/health.svg)

```
[![Health](https://phpackages.com/badges/geekish-faker-horse-battery-staple/health.svg)](https://phpackages.com/packages/geekish-faker-horse-battery-staple)
```

###  Alternatives

[mbezhanov/faker-provider-collection

A collection of custom providers for the Faker library

2179.4M25](/packages/mbezhanov-faker-provider-collection)[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k69](/packages/verbb-formie)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k18](/packages/solspace-craft-freeform)[blackfire/player

A powerful web crawler and web scraper with Blackfire support

49617.1k](/packages/blackfire-player)[pelmered/fake-car

Fake-Car is a Faker provider that generates fake car data for you.

1261.4M2](/packages/pelmered-fake-car)[directorytree/dummy

439.9k](/packages/directorytree-dummy)

PHPackages © 2026

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