PHPackages                             nkey/caribu - 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. nkey/caribu

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

nkey/caribu
===========

Annotation based OR Mapping framework for PHP

v1.0.1(10y ago)326BSD-2-ClausePHPPHP ~5.6|~7.0

Since Sep 27Pushed 8y ago2 watchersCompare

[ Source](https://github.com/maikgreubel/caribu-orm)[ Packagist](https://packagist.org/packages/nkey/caribu)[ Docs](https://github.com/maikgreubel/caribu-orm)[ RSS](/packages/nkey-caribu/feed)WikiDiscussions master Synced 1mo ago

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

[![Build Status](https://camo.githubusercontent.com/2c2c3a7502b56e0ea3eaec5e0863507c553f57224ff4fa00274f2d899b9971ee/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d61696b6772657562656c2f6361726962752d6f726d2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/maikgreubel/caribu-orm/build-status/master)[![Code Coverage](https://camo.githubusercontent.com/13c2831efef5a351dc16da3209c679534cfc9d63f032294d19cec2e4d0d5825f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d61696b6772657562656c2f6361726962752d6f726d2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/maikgreubel/caribu-orm/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/1ff5578198274db56a437983af5b6353f7857f6e441febe43f68505a4677d94d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d61696b6772657562656c2f6361726962752d6f726d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/maikgreubel/caribu-orm/?branch=master)[![Dependency Status](https://camo.githubusercontent.com/77ecf334b2be62a36f52b162d6cf894ad49a3548f3fbbced5e419b4bce0e90d8/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3535653263363732633664386632303031643030303333352f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/55e2c672c6d8f2001d000335)[![Codacy Badge](https://camo.githubusercontent.com/b131394eb0429f50da6965ecf138f58b5d7c88d62f99316fc066174bac1b5596/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f3430393035316365616534663431646162623063623739626630663264356531)](https://www.codacy.com/app/greubel/caribu-orm)

caribu
======

[](#caribu)

An annotation-based PHP Object Relational Mapper

This project aims to be an object relational mapper easy to use. The main target is to support developers writing only simple attribute containing classes and store it as entities into a database.

It has support for annotations so it is very flexible.

Here is a very basic example about the usage (for sqlite):

```
  CREATE TABLE super_duper_content (id INTEGER PRIMARY KEY, content TEXT);
```

```
  /* SuperDuperEntity.php */

  /**
   * @table super_duper_content
   */
  class SuperDuperEntity extends AbstractModel
  {
    /**
     * @column id
     */
    private $sid;

    private $content;

    public function setSid($sid)
    {
      $this->sid = $sid;
    }

    public function getSid()
    {
      return $this->sid;
    }

    public function setContent($content)
    {
      $this->content = $content;
    }

    public function getContent()
    {
      return $this->content;
    }
  }
```

```
  /* write-data-example.php */

  use \Nkey\Caribu\Orm\Orm;

  /* First configure the ORM */
  Orm::configure(array(
    'type' => 'sqlite',
    'file' => ':memory:'
  ));

  // Create sqlite database table for memory storage
  // Orm::getInstance()->getConnection()->exec("CREATE TABLE super_duper_content (id INTEGER PRIMARY KEY, content TEXT)");

  /* Now create a new entity and persist it to database */
  $entity = new SuperDuperEntity();
  $entity->setContent("Mega important content");
  $entity->persist();
```

```
  /* read-data-example.php */

  /* First read the entity from database */
  $entity = SuperDuperEntity::find(array('content' => "Mega important content"));

  /* Display the content */
  echo $entity->getContent();
```

No need to write infrastructure and boilerblate code by yourself. Let the Orm do the hard work for you.

Caribu provides a convention-over-configuration behaviour by supporting annotations.

See the [Wiki](https://github.com/maikgreubel/caribu-orm/wiki) for more information about the capabilities and usage.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Total

3

Last Release

3789d ago

PHP version history (2 changes)1.0.x-devPHP &gt;=5.4

v1.0.0PHP ~5.6|~7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d390422a6ff7b8c9131780d182a38e21188e6df8f5cb03d0a0dae34bb856915?d=identicon)[maikgreubel](/maintainers/maikgreubel)

---

Top Contributors

[![maikgreubel](https://avatars.githubusercontent.com/u/745973?v=4)](https://github.com/maikgreubel "maikgreubel (129 commits)")

---

Tags

orm

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/nkey-caribu/health.svg)

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

###  Alternatives

[propel/propel

Propel2 is an open-source Object-Relational Mapping (ORM) for PHP.

1.3k5.3M110](/packages/propel-propel)[hautelook/alice-bundle

Symfony bundle to manage fixtures with Alice and Faker.

19519.4M34](/packages/hautelook-alice-bundle)[theofidry/alice-data-fixtures

Nelmio alice extension to persist the loaded fixtures.

32328.5M70](/packages/theofidry-alice-data-fixtures)[directorytree/ldaprecord

A fully-featured LDAP ORM.

5782.9M10](/packages/directorytree-ldaprecord)[topthink/think-orm

the PHP Database&amp;ORM Framework

4542.0M218](/packages/topthink-think-orm)[cycle/database

DBAL, schema introspection, migration and pagination

64690.9k31](/packages/cycle-database)

PHPackages © 2026

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