PHPackages                             havvg/propel-autoexpire-behavior - 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. [Database &amp; ORM](/categories/database)
4. /
5. havvg/propel-autoexpire-behavior

ActiveLibrary[Database &amp; ORM](/categories/database)

havvg/propel-autoexpire-behavior
================================

The AutoExpireBehavior adds automatic expiration to your model.

0.1.0(13y ago)0149MITPHP

Since Jan 8Pushed 13y ago1 watchersCompare

[ Source](https://github.com/havvg/AutoExpireBehavior)[ Packagist](https://packagist.org/packages/havvg/propel-autoexpire-behavior)[ RSS](/packages/havvg-propel-autoexpire-behavior/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

AutoExpireBehavior
==================

[](#autoexpirebehavior)

[![Build Status](https://camo.githubusercontent.com/2d5223d19dfbce607026ef99f6f8e81110dd9544ab1963262c1bd11db6c485f6/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f68617676672f4175746f4578706972654265686176696f722e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/havvg/AutoExpireBehavior)

See the Propel documentation on how to [install a third party behavior](http://propelorm.org/documentation/07-behaviors.html#using_thirdparty_behaviors)

Usage
-----

[](#usage)

Just add the following XML tag in your `schema.xml` file:

```

```

The behavior will add a column storing the expiration date and those methods: `preExpire`, `expire`, `doExpire`, `postExpire` and `isExpired`.

### Configuration

[](#configuration)

The following options are provided to customize the behavior.

The `column` option defines the name of the column to store the expiration date into. If the column is not given, it will be added. Defaults to `expires_at`.

The `required` flag indicates whether the expiration date is required. If `true` the column will be `NOT NULL`.

An `auto_delete` option can be set to automatically delete the expired model. When set, this option will apply the "Expiration" behavior to the `postHydrate` hook of the model.

Expiration
----------

[](#expiration)

Whenever a model expires by calling `expire`, the following behavior is applied - similar to `save` or `delete`.

1. The `preExpire` method is called. The process will be aborted, if this methods returns `false`.
2. The `doExpire` method will be called.
3. The `postExpire` method is called afterwards.

In addition, the `isExpired` method will be added to check whether the model is expired.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

4925d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b63441a1dd6a38264525b55bc81181fa69af022a9dafff46610d8f7fd407785?d=identicon)[havvg](/maintainers/havvg)

---

Top Contributors

[![havvg](https://avatars.githubusercontent.com/u/126898?v=4)](https://github.com/havvg "havvg (5 commits)")

---

Tags

phppropelexpirationBehaviorpropelauto-expire

### Embed Badge

![Health badge](/badges/havvg-propel-autoexpire-behavior/health.svg)

```
[![Health](https://phpackages.com/badges/havvg-propel-autoexpire-behavior/health.svg)](https://phpackages.com/packages/havvg-propel-autoexpire-behavior)
```

###  Alternatives

[josegonzalez/cakephp-upload

CakePHP plugin to handle file uploading sans ridiculous automagic

5461.4M11](/packages/josegonzalez-cakephp-upload)[propel/propel-bundle

Integration of Propel in Symfony

184908.2k54](/packages/propel-propel-bundle)[mysql-workbench-schema-exporter/mysql-workbench-schema-exporter

MySQL Workbench Schema Exporter

488195.6k11](/packages/mysql-workbench-schema-exporter-mysql-workbench-schema-exporter)[carpehora/extrapropertiesbehavior

ExtraPropertiesBehavior is a propel behavior to store key/value extra fields in a propel model.

2120.8k](/packages/carpehora-extrapropertiesbehavior)[voskobovich/yii2-linker-behavior

This behavior makes it easy to maintain many-to-many and one-to-many relations in your ActiveRecord models.

80336.2k9](/packages/voskobovich-yii2-linker-behavior)[sjaakp/yii2-sortable-behavior

Sort ActiveRecords and related records in Yii2.

36169.5k](/packages/sjaakp-yii2-sortable-behavior)

PHPackages © 2026

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