PHPackages                             davidmars/redbean - 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. davidmars/redbean

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

davidmars/redbean
=================

RedBeanPHP ORM (with an after\_open event on models...)

v5.0.0.1(8y ago)01601New BSD and GPLv2PHPPHP &gt;=5.3.4

Since Nov 1Pushed 8y ago1 watchersCompare

[ Source](https://github.com/davidmars/redbean)[ Packagist](https://packagist.org/packages/davidmars/redbean)[ Docs](https://redbeanphp.com/)[ RSS](/packages/davidmars-redbean/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)DependenciesVersions (23)Used By (1)

RedBeanPHP 5
============

[](#redbeanphp-5)

[![Build Status](https://camo.githubusercontent.com/8e6c195f716825d13f80ce202d3ce7a73f9c2d3daac3697a165e100349167b38/68747470733a2f2f7472617669732d63692e6f72672f6761626f7264656d6f6f696a2f7265646265616e2e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/8e6c195f716825d13f80ce202d3ce7a73f9c2d3daac3697a165e100349167b38/68747470733a2f2f7472617669732d63692e6f72672f6761626f7264656d6f6f696a2f7265646265616e2e7376673f6272616e63683d6d6173746572)

RedBeanPHP is an easy to use ORM tool for PHP.

- Automatically creates tables and columns as you go
- No configuration, just fire and forget
- No complicated package tools, no autoloaders, just ONE file

Installation via Composer
-------------------------

[](#installation-via-composer)

Just open your composer.json file and add the package name `(e.g. "gabordemooij/redbean": "dev-master")` in your require list.

```
{
    "require": {
        "gabordemooij/redbean": "dev-master"
    }
}
```

**NOTE**: You will find many examples on the RedBean website make use of RedBean's `R` class. Because of namespaced autoloading in Composer, this class will be available as `\RedbeanPHP\R` instead of `R`. If you desire to use the much shorter `R` alias, you can add a `use` statement at the beginning of your code:

```
use \RedBeanPHP\R as R;
```

**NOTE:**It is important to note that when using RedBeanPHP with Composer, there are some extra precautions needed when working with [Models](https://redbeanphp.com/index.php?p=/models). Due to the namespace requirements of Composer, when creating Models we need to use the `SimpleModel` to extend, not `RedBean_SimpleModel`. Furthermore, we need to specify the namespace of the `SimpleModel`, so a full example of using a Model with RedBean with Composer is as follows:

```
use \RedBeanPHP\R;

class Model_User extends \RedBeanPHP\SimpleModel
{
    ...
}
```

Notice that we also need to add the `use \RedBeanPHP\R` statement so that we can use the `R::` shortcut within the Model.

Quick Example
-------------

[](#quick-example)

How we store a book object with RedBeanPHP:

```
$book = R::dispense("book");
$book->author = "Santa Claus";
$book->title = "Secrets of Christmas";
$id = R::store( $book );
```

Yep, it's that simple.

More information
----------------

[](#more-information)

For more information about RedBeanPHP please consult the RedBeanPHP website:

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 81.3% 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 ~113 days

Recently: every ~163 days

Total

18

Last Release

3011d ago

Major Versions

v3.5.1 → v4.2.02015-04-01

v4.3.4 → v5.02017-10-19

PHP version history (2 changes)v3.3.5PHP &gt;=5.2.0

v4.2.0PHP &gt;=5.3.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/0c928c3b501e96035a9cb6598614d905967b7b2c262cd04ed0989bc6db6c4bf8?d=identicon)[davidmars](/maintainers/davidmars)

---

Top Contributors

[![gabordemooij](https://avatars.githubusercontent.com/u/89826?v=4)](https://github.com/gabordemooij "gabordemooij (1001 commits)")[![daviddeutsch](https://avatars.githubusercontent.com/u/630246?v=4)](https://github.com/daviddeutsch "daviddeutsch (113 commits)")[![tomasklapka](https://avatars.githubusercontent.com/u/370171?v=4)](https://github.com/tomasklapka "tomasklapka (14 commits)")[![DontNeedGithubAccount](https://avatars.githubusercontent.com/u/5270067?v=4)](https://github.com/DontNeedGithubAccount "DontNeedGithubAccount (13 commits)")[![simirimia](https://avatars.githubusercontent.com/u/11245808?v=4)](https://github.com/simirimia "simirimia (12 commits)")[![seanhess](https://avatars.githubusercontent.com/u/16249?v=4)](https://github.com/seanhess "seanhess (8 commits)")[![katanacrimson](https://avatars.githubusercontent.com/u/121707?v=4)](https://github.com/katanacrimson "katanacrimson (8 commits)")[![davidmars](https://avatars.githubusercontent.com/u/1409408?v=4)](https://github.com/davidmars "davidmars (7 commits)")[![MartinPenev](https://avatars.githubusercontent.com/u/3450040?v=4)](https://github.com/MartinPenev "MartinPenev (4 commits)")[![jreklund](https://avatars.githubusercontent.com/u/3641536?v=4)](https://github.com/jreklund "jreklund (4 commits)")[![jstsch](https://avatars.githubusercontent.com/u/602751?v=4)](https://github.com/jstsch "jstsch (4 commits)")[![oivseblya](https://avatars.githubusercontent.com/u/166500051?v=4)](https://github.com/oivseblya "oivseblya (4 commits)")[![SteveEdson](https://avatars.githubusercontent.com/u/1201960?v=4)](https://github.com/SteveEdson "SteveEdson (3 commits)")[![DeyV](https://avatars.githubusercontent.com/u/311626?v=4)](https://github.com/DeyV "DeyV (3 commits)")[![Rotzbua](https://avatars.githubusercontent.com/u/7337347?v=4)](https://github.com/Rotzbua "Rotzbua (3 commits)")[![marcioAlmada](https://avatars.githubusercontent.com/u/227395?v=4)](https://github.com/marcioAlmada "marcioAlmada (3 commits)")[![F21](https://avatars.githubusercontent.com/u/2263040?v=4)](https://github.com/F21 "F21 (3 commits)")[![hugollm](https://avatars.githubusercontent.com/u/376767?v=4)](https://github.com/hugollm "hugollm (3 commits)")[![zerotri](https://avatars.githubusercontent.com/u/226539?v=4)](https://github.com/zerotri "zerotri (2 commits)")[![benmajor](https://avatars.githubusercontent.com/u/1329832?v=4)](https://github.com/benmajor "benmajor (2 commits)")

---

Tags

orm

### Embed Badge

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

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

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

Symfony DoctrineBundle

4.8k241.3M3.3k](/packages/doctrine-doctrine-bundle)[doctrine/persistence

The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.

4.1k286.5M762](/packages/doctrine-persistence)[gedmo/doctrine-extensions

Doctrine behavioral extensions

4.1k118.8M366](/packages/gedmo-doctrine-extensions)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[beberlei/doctrineextensions

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL, Oracle, PostgreSQL and SQLite.

2.1k75.1M146](/packages/beberlei-doctrineextensions)

PHPackages © 2026

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