PHPackages                             hightowersu/redbean\_rebean - 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. hightowersu/redbean\_rebean

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

hightowersu/redbean\_rebean
===========================

This is a plugin for the RedBeanPHP ORM, which will be generating automatically revision tables for given Beans

01PHP

Since Oct 16Pushed 6mo agoCompare

[ Source](https://github.com/highTowerSU/RedBean_ReBean)[ Packagist](https://packagist.org/packages/hightowersu/redbean_rebean)[ RSS](/packages/hightowersu-redbean-rebean/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

RedBean\_ReBean (RevisionBean)
==============================

[](#redbean_rebean-revisionbean)

This is a plugin for the [RedBeanPHP ORM](http://www.redbeanphp.com/), which will be generating automatically revision tables for given Beans

This is achieved by creating a table named after your beantype plus the "revision" prefix. The table contains all the columns from your bean. Additionally it has a column "action" specifying if this revision was made by an \[INSERT,UPDATE,DELETE\] statement. Also inlcuded is the column "original\_id" which represents the ID of the bean, that's been revisioned. Finally there is a "lastedit" column indicating when the change happend.

All the functionallity is achieved by using AFTER Triggers

Current status: The plugin so far works for Mysql, although not properly tested. Please use it just for testing and NOT IN PRODUCTION so far.

Update:
=======

[](#update)

- Now uses the R::ext plugin helper so you can access Revisioning without any previous instance creation. Just use R::createRevisionSupport($YOURBEAN);
- Added PHPUnit Tests
- Throw Exception if Bean is already under revision support

Usage:
======

[](#usage)

- Download the latest version of [RedBean from Github](https://github.com/gabordemooij/redbean) or install via Composer.
- Add the file ReBean.php to the RedBean/Plugin folder
- Either manually require the file or see the [RedBean instructions](http://www.redbeanphp.com/replica) for building your on RB.php file
- Create your first bean type
- Store it in the DB (R::store($YOURBEAN))
- Call the revision method like this

```
   R::createRevisionSupport($YOURBEAN);
```

- Happy modifying of your previous Bean. You should be able to see all changes in the created revisiontable

Example:
========

[](#example)

Take a look at the included example.php.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance46

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 60% 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.

### Community

Maintainers

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

---

Top Contributors

[![zewa666](https://avatars.githubusercontent.com/u/2861414?v=4)](https://github.com/zewa666 "zewa666 (6 commits)")[![highTowerSU](https://avatars.githubusercontent.com/u/3651850?v=4)](https://github.com/highTowerSU "highTowerSU (4 commits)")

### Embed Badge

![Health badge](/badges/hightowersu-redbean-rebean/health.svg)

```
[![Health](https://phpackages.com/badges/hightowersu-redbean-rebean/health.svg)](https://phpackages.com/packages/hightowersu-redbean-rebean)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M545](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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