PHPackages                             robinbrackez/password-expiration-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. [Security](/categories/security)
4. /
5. robinbrackez/password-expiration-bundle

ActiveSymfony-bundle[Security](/categories/security)

robinbrackez/password-expiration-bundle
=======================================

Symfony bundle to enforce users to change their password periodically.

1.0.0-alpha5(2y ago)01MITPHPPHP &gt;=8.1

Since Jan 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/RobinBrackez/password-expiration-bundle)[ Packagist](https://packagist.org/packages/robinbrackez/password-expiration-bundle)[ Docs](https://www.github.com/robinbrackez/password-expiration-bundle)[ RSS](/packages/robinbrackez-password-expiration-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

Password Expiration Bundle
==========================

[](#password-expiration-bundle)

About
-----

[](#about)

Symfony bundle to enforce users to change their password every X days, and keeps track when the password was changed.

The bundle won't allow to user to navigate to any page unless they change their password.

It can be integrated with **EasyAdmin** bundle, but it's not a requirement.

This is meant for Symfony projects that use the MVC pattern, not for apis.

It doesn't support multiple login methods, so sites that have different login pages for admins and users are not supported.

Install
-------

[](#install)

`composer req robinbrackez/password-expiration-bundle`

Add the bundle to `config/bundles.php`

```
    RobinBrackez\PasswordExpirationBundle\PasswordExpirationBundle::class => ['all' => true],

```

### Add to your User class:

[](#add-to-your-user-class)

- `implements RobinBrackez\PasswordExpirationBundle\User\PasswordExpirableInterface`
- `use RobinBrackez\PasswordExpirationBundle\User\PasswordExpirableTrait`

**For instance:**

```
namespace App\Entity\User;

use RobinBrackez\PasswordExpirationBundle\User\PasswordExpirableInterface;
use RobinBrackez\PasswordExpirationBundle\User\PasswordExpirableTrait;

class User implements PasswordExpirableInterface {
    use PasswordExpirableTrait;

```

Create and run **migrations** to add the `password_changed_at` field to the User table.

There needs to be a property called 'password' inside your User entity, this is necessary for the listener to check on.

### Config:

[](#config)

- **changePasswordRouteName**: the name of the route to change your password
- **passwordMaxDaysOld**: the age in days when users need to change their password
- **easyadmin.changePasswordControllerName**: when working with EasyAdmin, pass the FQDN of the controller that handles changing passwords
- **easyadmin.changePasswordControllerActionName**: when working with EasyAdmin, pass the action name of the controller that handles changing passwords

**For instance:**

```
parameters:
    changePasswordRouteName: 'app_change_password'
    passwordMaxDaysOld: 30  # every month
    easyadmin.changePasswordControllerName: 'App\Controller\Admin\UserCrudController'
    easyadmin.changePasswordControllerActionName: 'changePassword' # this is the method name of the changePasswordRouteName

```

If you don't have EasyAdmin, omit the easyadmin related parameters

Only GET requests
-----------------

[](#only-get-requests)

It only forwards GET requests, not POSTS or so, to avoid that users get the change password screen when they submitted a form and would lose their changes.

Versioning
----------

[](#versioning)

Works with Symfony 5.4 and 6.x

Not yet a Symfony 7.x branch

Symfony 6.4 may get deprecate notices.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

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

Total

3

Last Release

832d ago

### Community

Maintainers

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

---

Top Contributors

[![RobinBrackez](https://avatars.githubusercontent.com/u/7022901?v=4)](https://github.com/RobinBrackez "RobinBrackez (1 commits)")

---

Tags

symfonysecuritypasswordexpirationeasyadmin

### Embed Badge

![Health badge](/badges/robinbrackez-password-expiration-bundle/health.svg)

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

###  Alternatives

[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[gregwar/captcha-bundle

Captcha bundle

3524.7M32](/packages/gregwar-captcha-bundle)[scheb/2fa

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

578630.7k1](/packages/scheb-2fa)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1714.8k8](/packages/2lenet-crudit-bundle)[usu/scrypt-password-encoder-bundle

Scrypt password encoder for Symfony2

191.3k](/packages/usu-scrypt-password-encoder-bundle)[rezzza/security-bundle

Signed requests check

1753.6k](/packages/rezzza-security-bundle)

PHPackages © 2026

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