PHPackages                             wriver4/activerecord - 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. wriver4/activerecord

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

wriver4/activerecord
====================

Activerecord is a revised implementation of php-Activerecord by jpfuent an open source ORM library based on the Activerecord pattern.

2.0.0(10y ago)230MITPHP

Since May 6Pushed 10y agoCompare

[ Source](https://github.com/wriver4/activerecord)[ Packagist](https://packagist.org/packages/wriver4/activerecord)[ Docs](http://www.whizbangdevelopers.com/)[ RSS](/packages/wriver4-activerecord/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Activerecord
============

[](#activerecord)

Warning working on conforming to PSR-1 starting 5/11/2016 use Ver. 1.1

Instructions
------------

[](#instructions)

Uses Composer to manage autoload. In bootstrap file assuming root directory.

```
$loader = require_once 'vendor/autoload.php';
$loader->addPsr4('Models\\', __dir__.'\Models');
// What? Why? Composers base path is vendor and I don't want to update Composer for every new Model.

//Simple Config
$cfg = Activerecord\Config::instance();
$cfg->setConnections(array(
    'development' =>
    'mysql://root:root@localhost/treebark?charset=utf8'));
```

Model classes

```
namespace Models;

class Bar \\ for table name bars by convention
        extends \Activerecord\Model \\ leading slash required
{
}
```

Super Simple Usage Example:

```
$bars = Models\Bar::find(1)->to_array();
echo $bars['name'];
echo '';
$bars = Models\Bar::all();
foreach ($bars as $bar)
{
    echo ' id:';
    echo $bar->id;
    echo ' Name of Bar:';
    echo $bar->name;
    echo ' Address:';
    echo $bar->address;
    echo '';
}
```

The php-Activerecord.org instructions for use remain the same.

### Updated 4/25/2016

[](#updated-4252016)

A revised implementation of php-Activerecord by jpfuentes; Currently working but testing system incomplete.

### Original Commit 12/9/2015

[](#original-commit-1292015)

A revised implementation of php-Activerecord by jpfuentes This is an inprocess version testing is not complete. So far the php-Activerecord.org instructions for use remain the same.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity64

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

Total

2

Last Release

3674d ago

Major Versions

1.1.0 → 2.0.02016-06-09

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1435548?v=4)[wriver4](/maintainers/wriver4)[@wriver4](https://github.com/wriver4)

---

Top Contributors

[![wriver4](https://avatars.githubusercontent.com/u/1435548?v=4)](https://github.com/wriver4 "wriver4 (169 commits)")

---

Tags

ormactiverecord

### Embed Badge

![Health badge](/badges/wriver4-activerecord/health.svg)

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

###  Alternatives

[php-activerecord/php-activerecord

php-activerecord is an open source ORM library based on the ActiveRecord pattern.

1.3k402.7k21](/packages/php-activerecord-php-activerecord)[tommyknocker/pdo-database-class

Framework-agnostic PHP database library with unified API for MySQL, MariaDB, PostgreSQL, SQLite, MSSQL, and Oracle. Query Builder, caching, sharding, window functions, CTEs, JSON, migrations, ActiveRecord, CLI tools, AI-powered analysis. Zero external dependencies.

826.0k](/packages/tommyknocker-pdo-database-class)[bephp/activerecord

micro activerecord library in PHP(only 400 lines with comments), support chain calls and relations(HAS\_ONE, HAS\_MANY, BELONGS\_TO).

1162.1k2](/packages/bephp-activerecord)[spinitron/yii2-dynamic-ar

Extends Yii ActiveRecord for Maria Dynamic Columns

577.0k](/packages/spinitron-yii2-dynamic-ar)[php-patterns/activerecord

php-activerecord is an open source ORM library based on the ActiveRecord pattern.

4211.3k](/packages/php-patterns-activerecord)[cycle/active-record

Provides a simple way to work with your database using Active Record pattern and Cycle ORM

671.6k5](/packages/cycle-active-record)

PHPackages © 2026

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