PHPackages                             hec-franco/password-policy-bundle - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. hec-franco/password-policy-bundle

Abandoned → [nowo-tech/password-policy-bundle](/?search=nowo-tech%2Fpassword-policy-bundle)Library[Authentication &amp; Authorization](/categories/authentication)

hec-franco/password-policy-bundle
=================================

Password policy enforcements for symfony 6|7

v1.0.7(1y ago)03.1k1MITPHPPHP ^8.1|^8.2|^8.3|^8.4

Since Feb 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/HecFranco/PasswordPolicyBundle)[ Packagist](https://packagist.org/packages/hec-franco/password-policy-bundle)[ RSS](/packages/hec-franco-password-policy-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (9)Used By (0)

Password Policy Bundle
======================

[](#password-policy-bundle)

[![Build Status](https://camo.githubusercontent.com/0f5f46bf3c7b357831f0377fad859337af158d2b7dcc36d3c678d3947639bd31/68747470733a2f2f7472617669732d63692e6f72672f6465737061726b2f70617373776f72642d706f6c6963792d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/despark/password-policy-bundle)

### Installation

[](#installation)

```
composer require despark/password-policy-bundle
```

### Configuration

[](#configuration)

1. Implement `HecFranco\PasswordPolicyBundle\Model\HasPasswordPolicyInterface` in the entities that you want to support password policies.
2. Implement `HecFranco\PasswordPolicyBundle\Model\PasswordHistoryInterface` in a new entity that will hold the password history records.
3. Configure how Password policy will behave on every entity. Configuration example is [here](#configuration-example)
4. You need to add `@PasswordPolicy()` validation rules to your `$plainPassword` field

###### Configuration example:

[](#configuration-example)

```
hec_franco_password_policy:
    entities:
        # the entity class implementing HasPasswordPolicyInterface
        App\Entity\Participant:
            # The route where the user will be notified when password is expired
            notified_routes:
                - participant_profile
            # These routes will be excluded from the expiry check
            excluded_notified_routes: ~
            # Which is the password property in the entity (defaults to 'password')
            password_field: ~

            # Password history property in the entity (default to 'passwordHistory')
            password_history_field: ~

            # How many password changes to track (defaults to 3)
            passwords_to_remember: ~

            # Force expiry of the password in that many days
            expiry_days: ~
        App\Entity\User:
            notified_routes:
                - admin_app_user_edit
    expiry_listener:
            # You can change the expiry listener priority
            priority: 0
            error_msg:
                text:
                    title: 'Your password expired.'
                    message: 'You need to change it'
                type: 'error'

        listener_priority: 0
        # The route that needs to be shown to the user when password is expired
        lock_route: participant_settings

```

##### Expiry

[](#expiry)

Expiry works by checking last password change on every request made to the app, excluding those configured in the application

##### Good to know

[](#good-to-know)

The library uses doctrine lifecycle events to create password history and set last password change on the target entities. In order for this to happen we use the onFlush event and we are recalculating the history change set inside it. You must be aware of that as any entity changes after the recalculation will not be persisted to the database.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance47

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 66.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 ~62 days

Recently: every ~108 days

Total

8

Last Release

393d ago

PHP version history (2 changes)v1.0.0PHP ^8.0

v1.0.7PHP ^8.1|^8.2|^8.3|^8.4

### Community

Maintainers

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

---

Top Contributors

[![HecFranco](https://avatars.githubusercontent.com/u/24323276?v=4)](https://github.com/HecFranco "HecFranco (10 commits)")[![shakaran](https://avatars.githubusercontent.com/u/14254?v=4)](https://github.com/shakaran "shakaran (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hec-franco-password-policy-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/hec-franco-password-policy-bundle/health.svg)](https://phpackages.com/packages/hec-franco-password-policy-bundle)
```

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

50570.7k1](/packages/web-auth-webauthn-framework)[scheb/2fa

Two-factor authentication for Symfony applications (please use scheb/2fa-bundle to install)

578630.7k1](/packages/scheb-2fa)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[web-auth/webauthn-symfony-bundle

FIDO2/Webauthn Security Bundle For Symfony

63397.4k6](/packages/web-auth-webauthn-symfony-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

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