PHPackages                             avalon/database - 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. avalon/database

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

avalon/database
===============

Avalon Database Component

0880PHP

Since Mar 25Pushed 8y ago2 watchersCompare

[ Source](https://github.com/avalonphp/database)[ Packagist](https://packagist.org/packages/avalon/database)[ RSS](/packages/avalon-database/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Avalon Database
===============

[](#avalon-database)

The Avalon database package makes use of the Doctrine [Database Abstraction Layer](http://www.doctrine-project.org/projects/dbal.html), it is essentially a small wrapper around it that provides a simple "Model" system.

This is *not* an ORM.

Models
------

[](#models)

Models are a representation of a database row, you can select, update and delete rows with models.

Selecting rows into models
--------------------------

[](#selecting-rows-into-models)

When using a model to fetch data, it will automatically be placed into a model for you.

```
class Article extends Avalon\Database\Model {}

$articles = Article::where('is_published = :is_published')
    ->andWhere('user_id = :user_id')
    ->setParameter('is_published', 1)
    ->setParameter('user_id', 5)
    // Normally with Doctrine and PDO you would call `->execute()`,
    // you could do that here, but it would return the statement.
    //
    // If you simply call `fetchAll()` you will get an array of `Article` models.
    ->fetchAll();

foreach ($articles as $article) {
    echo $article->title;
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d5e4c3b5325b2392a07c30d0312451c915428a3aa6fbfa8a676b978320c03ea?d=identicon)[Nirix](/maintainers/Nirix)

---

Top Contributors

[![nirix](https://avatars.githubusercontent.com/u/61958?v=4)](https://github.com/nirix "nirix (88 commits)")

### Embed Badge

![Health badge](/badges/avalon-database/health.svg)

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

###  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.0M542](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M209](/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)
