Download the PHP package ballen/plexity without Composer
On this page you can find all versions of the php package ballen/plexity. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package plexity
Plexity
Plexity (Password Complexity) is a password complexity library that enables you to set "rules" for a password (or any other kind of string) that you can then check against in your application.
This library supports the following kind of complexity settings:
- Upper/lowercase character detection
- Number containment
- Special character containment
- Minimum/maximum character detection
- Password age expiry detection
- Detection of previous use such as against a password history datastore.
- Ability to add and check against a configurable list of common passwords/words etc.
Requirements
This library is developed and tested against PHP 7.3, 7.4, 8.0, 8.1 and 8.2!
If you need to use an older version of PHP, you should instead install the 1.x version of this library (see below for details).
License
This client library is released under the MIT license, a copy of the license is provided in this package.
Setup
To install the package into your project (assuming you are using the Composer package manager) you can simply execute the following command from your terminal in the root of your project folder:
If you need to use an older version of PHP, version 1.x.x supports PHP 5.6, 7.0, 7.1 and 7.2, you can install this version using Composer with this command instead:
Examples
A simple example of how you can use the methods to build up a password complexity rule-set and then validate the password.
Tests and coverage
This library is fully unit tested using PHPUnit.
I use GitHub Actions for continuous integration, which triggers tests for PHP 7.3, 7.4, 8.0, 8.1 and 8.2 every time a commit is pushed.
If you wish to run the tests yourself you should run the following:
Code coverage can also be run but requires XDebug installed...
Support
I am happy to provide support via. my personal email address, so if you need a hand drop me an email at: [[email protected]]().