PHPackages                             siriusphp/orm - 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. siriusphp/orm

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

siriusphp/orm
=============

Powerfull and fast PDO-based data mapper

2.0.0(5y ago)1346[1 issues](https://github.com/siriusphp/Orm/issues)MITPHPPHP &gt;=7.2CI failing

Since Feb 21Pushed 5y ago1 watchersCompare

[ Source](https://github.com/siriusphp/Orm)[ Packagist](https://packagist.org/packages/siriusphp/orm)[ RSS](/packages/siriusphp-orm/feed)WikiDiscussions master Synced 1w ago

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

[![Source Code](https://camo.githubusercontent.com/5f385d3337164f55a22e04f2985f0db8519fa6d009e8801cac149629454e9855/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d7369726975737068702f6f726d2d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/siriusphp/orm)[![Latest Version](https://camo.githubusercontent.com/4c8f5c4cc4b0416ea99db37c945491a579e0febc8d47bcfbca9a9aca36dab3d8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7369726975737068702f6f726d2e7376673f7374796c653d666c61742d737175617265)](https://github.com/siriusphp/orm/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/siriusphp/orm/blob/master/LICENSE)[![Build Status](https://camo.githubusercontent.com/fa1059549a80b14bbcde0b8ffc5d7c8897328c2104501303de520f88d5ecb8c4/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7369726975737068702f6f726d2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/siriusphp/orm)[![Coverage Status](https://camo.githubusercontent.com/de36d72a75446651755832f6f5dcf8ccee8c64cf36125eaa16712f9de5eb9dfb/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f7369726975737068702f6f726d2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/siriusphp/orm/code-structure)[![Quality Score](https://camo.githubusercontent.com/fd60a09a36666d39f7cac2427bb4e52a8d5f51ee39c157db6a807d9846ff487d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7369726975737068702f6f726d2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/siriusphp/orm)

Sirius ORM is a [fast and lightweight](https://github.com/adrianmiu/forked-php-orm-benchmark) yet flexible data mapper solution developed with DX in mind. It offers:

1. Mapping rows to your own entities
2. Relations and relation aggregates (COUNT/AVERAGE)
3. Eager-loading &amp; lazy-loading (without increasing the number of queries)
4. Queries that let you JOIN with relations (not tables)
5. Deep persistence
6. Dynamically defined mappers
7. Speed &amp; low memory usage (no Entity Manager)
8. 90+% code coverage

### Installation

[](#installation)

```
composer require siriusphp/orm

```

### Initialization

[](#initialization)

```
use Sirius\Orm\Orm;
use Sirius\Orm\ConnectionLocator;
$connectionLocator = ConnectionLocator::new(
    'mysql:host=localhost;dbname=testdb',
    'username',
    'password'
);
$orm = new Orm($connectionLocator);
```

### Configuration

[](#configuration)

AKA, registering mappers and relations

```
$orm->register('pages', MapperConfig::fromArray([
    /**
     * here goes the configuration
     */
]));

// continue with the rest of mappers
```

### Usage

[](#usage)

```
// find by ID
$page = $orm->find('pages', 1);
// or via the mapper
$page = $orm->get('pages')->find(1);

// query
$pages = $orm->select('pages')
             ->where('status', 'published')
             ->orderBy('date desc')
             ->limit(10)
             ->get();

// manipulate
$page->title = 'Best ORM evah!';
$page->featured_image->path = 'orm_schema.png';

// persist
$orm->save($page);
// or via the mapper
$orm->get('pages')->save($page);
```

### Links

[](#links)

- [Documentation](https://www.sirius.ro/php/sirius/orm/)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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.

###  Release Activity

Cadence

Every ~147 days

Total

3

Last Release

1983d ago

Major Versions

0.9.0 → 1.0.02020-02-28

1.0.0 → 2.0.02020-12-12

PHP version history (2 changes)0.9.0PHP &gt;=7.1

2.0.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/e3de1fb0b661bb9affaf6283808f7e69e084827b7ef156c6d04ad261253b74dc?d=identicon)[adrianmiu](/maintainers/adrianmiu)

---

Top Contributors

[![adrianmiu](https://avatars.githubusercontent.com/u/1293017?v=4)](https://github.com/adrianmiu "adrianmiu (2 commits)")

---

Tags

dataormsqlpdomappingdatamapperModellingentity-frameworknot-activerecord

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/siriusphp-orm/health.svg)

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

###  Alternatives

[atlas/orm

An ORM for your persistence model (not your domain model).

429139.8k12](/packages/atlas-orm)[morris/lessql

LessQL: A lightweight and performant PHP ORM alternative

405140.0k3](/packages/morris-lessql)[atlas/cli

Command-line interface for Atlas.

14124.6k10](/packages/atlas-cli)[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.

845.7k](/packages/tommyknocker-pdo-database-class)[ramadan/easy-model

A Laravel package for enjoyably managing database queries.

101.6k](/packages/ramadan-easy-model)

PHPackages © 2026

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