PHPackages                             thru.io/active\_record - 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. thru.io/active\_record

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

thru.io/active\_record
======================

An active-record like implementation

0.4.3(10y ago)15331[5 issues](https://github.com/Thruio/ActiveRecord/issues)5PHP

Since Sep 20Pushed 6y ago2 watchersCompare

[ Source](https://github.com/Thruio/ActiveRecord)[ Packagist](https://packagist.org/packages/thru.io/active_record)[ RSS](/packages/thruio-active-record/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (13)Versions (31)Used By (5)

ActiveRecord
============

[](#activerecord)

[![Build Status](https://camo.githubusercontent.com/bdeb54992ee408ade070245d7c37409e400c6a6227aeec7372ae146cc43e79d3/68747470733a2f2f7472617669732d63692e6f72672f54687275696f2f4163746976655265636f72642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Thruio/ActiveRecord) [![Code Climate](https://camo.githubusercontent.com/bf7b5af5b0dc613f7afd7a90cb0dfcf0d1522f11367628aec714a48a5828d25b/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f54687275696f2f4163746976655265636f72642f6261646765732f6770612e737667)](https://codeclimate.com/github/Thruio/ActiveRecord) [![Test Coverage](https://camo.githubusercontent.com/3fefc7bf41dc29123489c0c47399dde8c5d023dfd2d616c748b07ef5709beb15/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f54687275696f2f4163746976655265636f72642f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/Thruio/ActiveRecord) [![Dependency Status](https://camo.githubusercontent.com/dd88229176f00b37224652aa240073a522f06e56bd5232cae0ebe673898ccf30/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3535396262383339363136363334303032323030303665652f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/559bb83961663400220006ee) [![Average time to resolve an issue](https://camo.githubusercontent.com/d7512e01b35dd600d4886ed3efe2c23c47f513bf012560e0565d9e6f35d3e273/687474703a2f2f697369746d61696e7461696e65642e636f6d2f62616467652f7265736f6c7574696f6e2f54687275696f2f4163746976655265636f72642e737667)](http://isitmaintained.com/project/Thruio/ActiveRecord "Average time to resolve an issue") [![Percentage of issues still open](https://camo.githubusercontent.com/33e48de8337ab1239f94ca2dcdca60e51b1ce9363e72299068587e8b2560620c/687474703a2f2f697369746d61696e7461696e65642e636f6d2f62616467652f6f70656e2f54687275696f2f4163746976655265636f72642e737667)](http://isitmaintained.com/project/Thruio/ActiveRecord "Percentage of issues still open")

Active Record for Composer. Requires PHP 5.4 and later.

### Install

[](#install)

1. Use [Composer](http://getcomposer.org) to install Active Record into your project:

    ```
    composer require thru.io/active_record
    ```
2. Use it as follows:

I really aught to write some examples to go with this project. For now, have a look at how the [test models](https://github.com/Thruio/ActiveRecord/blob/master/Thru/ActiveRecord/Test/TestModel.php) work

```
```bash
Something needs to be written....
```

```

### TODO List:

[](#todo-list)

- nullable types Done!
- versionable objects Done!
- inter-object relationships
- returning collections, not arrays.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 99.6% 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 ~41 days

Recently: every ~64 days

Total

14

Last Release

3716d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5707be384b9daab9858223c5dfead9d692e8b5f6afa8dd23ad5c5cbc149316b2?d=identicon)[matthewbaggett](/maintainers/matthewbaggett)

---

Top Contributors

[![matthewbaggett](https://avatars.githubusercontent.com/u/943948?v=4)](https://github.com/matthewbaggett "matthewbaggett (237 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/thruio-active-record/health.svg)

```
[![Health](https://phpackages.com/badges/thruio-active-record/health.svg)](https://phpackages.com/packages/thruio-active-record)
```

###  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.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

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

Reliese Components for Laravel Framework code generation.

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

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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