PHPackages                             acurrieclark/php-password-verifier - 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. acurrieclark/php-password-verifier

ActiveLibrary

acurrieclark/php-password-verifier
==================================

Framework agnostic password strength checker

v1.1(5y ago)470.9k↓50%3MITPHPPHP ^7.2 || ^8.0

Since Aug 13Pushed 4y ago1 watchersCompare

[ Source](https://github.com/acurrieclark/php-password-verifier)[ Packagist](https://packagist.org/packages/acurrieclark/php-password-verifier)[ RSS](/packages/acurrieclark-php-password-verifier/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (6)Used By (0)

Password Checker [![Build Status](https://camo.githubusercontent.com/2bc841b36f9da07165df75cefd8b4c55a36674f8fc59907959b71884509f1b27/68747470733a2f2f7472617669732d63692e6f72672f61637572726965636c61726b2f7068702d70617373776f72642d76657269666965722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/acurrieclark/php-password-verifier)
======================================================================================================================================================================================================================================================================================================================================================

[](#password-checker-)

A framework agnostic password checker for PHP.

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

[](#installation)

```
$ composer require acurrieclark/php-password-verifier

```

Usage
-----

[](#usage)

```
// include autoloader if you haven't already
include_once('vendor/autoload.php');

use acurrieclark\PhpPasswordVerifier\Verifier;

// create an instance
$passwordVerifier = new Verifier();

// default options are permissive, so  each constraint needs to be set as required
$passwordVerifier->setMinLength(8);

// constraints can also be chained
$passwordVerifier->setMaxLength(128)->setCheckContainsNumbers(true);

// check the password meets the requirements set (min length 8, max length 128, contains numbers)

$validPassword = $passwordVerifier->checkPassword("passwordToCheck");
```

Class Methods
-------------

[](#class-methods)

### Setting Password Constraints

[](#setting-password-constraints)

##### setMinLength(int $length)

[](#setminlengthint-length)

Set the minimum required length of the password

##### setMaxLength(int $length)

[](#setmaxlengthint-length)

Set the maximum allowed length of the password

##### setCheckContainsLetters(boolean $value)

[](#setcheckcontainslettersboolean-value)

Set the flag to check that the password contains at least one letter

##### setCheckContainsCapitals(boolean $value)

[](#setcheckcontainscapitalsboolean-value)

Set the flag to check that the password contains at least one *capital* letter

##### setCheckContainsNumbers(boolean $value)

[](#setcheckcontainsnumbersboolean-value)

Set the flag to check that the password contains at least one number

##### setCheckContainsNumbers(boolean $value)

[](#setcheckcontainsnumbersboolean-value-1)

Set the flag to check that the password contains at least one number

##### setCheckContainsSpecialChrs(boolean $value)

[](#setcheckcontainsspecialchrsboolean-value)

Set the flag to check that the password contains at least one special character from `{}()[]#,:;^.?!|&_`~@$%/\\=+-*"'`

##### setCheckBlacklist(boolean $value)

[](#setcheckblacklistboolean-value)

Set the flag to check if the password matches one of the 10000 most popular passwords from

### Checking the Password

[](#checking-the-password)

##### checkPassword(string $password)

[](#checkpasswordstring-password)

Verify the password based on the constraints imposed. Returns boolean.

##### getErrors()

[](#geterrors)

Returns an array of errors relating to the verified password

### Utility

[](#utility)

##### getSpecialChrs()

[](#getspecialchrs)

**Static:** Returns an array of the special characters used to check against when `setCheckContainsSpecialChrs(true)` has been set. Handy if you want to warn your users which characters they need to include.

License
-------

[](#license)

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

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% 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 ~405 days

Total

5

Last Release

1946d ago

Major Versions

v0.2.1 → v1.0.02019-11-13

PHP version history (3 changes)v0.2.1PHP ^5.4.0 || ^7.0

v1.0.0PHP ^7.2

v1.1PHP ^7.2 || ^8.0

### Community

Maintainers

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

---

Top Contributors

[![acurrieclark](https://avatars.githubusercontent.com/u/1306728?v=4)](https://github.com/acurrieclark "acurrieclark (18 commits)")[![glensc](https://avatars.githubusercontent.com/u/199095?v=4)](https://github.com/glensc "glensc (1 commits)")[![matfiz](https://avatars.githubusercontent.com/u/244515?v=4)](https://github.com/matfiz "matfiz (1 commits)")[![php-shift](https://avatars.githubusercontent.com/u/18268760?v=4)](https://github.com/php-shift "php-shift (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/acurrieclark-php-password-verifier/health.svg)

```
[![Health](https://phpackages.com/badges/acurrieclark-php-password-verifier/health.svg)](https://phpackages.com/packages/acurrieclark-php-password-verifier)
```

PHPackages © 2026

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