PHPackages                             moss/storage - 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. moss/storage

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

moss/storage
============

moss storage

v0.9.4(12y ago)21843[1 issues](https://github.com/mossphp/moss-storage/issues)MITPHPPHP &gt;=5.3.4

Since Apr 26Pushed 9y ago1 watchersCompare

[ Source](https://github.com/mossphp/moss-storage)[ Packagist](https://packagist.org/packages/moss/storage)[ RSS](/packages/moss-storage/feed)WikiDiscussions dev Synced 6d ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Moss Storage
============

[](#moss-storage)

[![Build Status](https://camo.githubusercontent.com/56bf13d1739fe1815cd465ad6705fe0e27e3841ee6787e17418e0cb19719c1c0/68747470733a2f2f7472617669732d63692e6f72672f6d6f73737068702f6d6f73732d73746f726167652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/mossphp/moss-storage)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7181b4768176ac34157fa8b20ed8f4eb66505e7dce28fe00d814b3b07faa3b9a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6f73737068702f6d6f73732d73746f726167652f6261646765732f7175616c6974792d73636f72652e706e673f733d36623131623331316139646665326431353066396232616338353638343236623265643362633966)](https://scrutinizer-ci.com/g/mossphp/moss-storage/)[![Code Coverage](https://camo.githubusercontent.com/5181ed337d8a2548ff892514695567c6a087618b30b3f33df12c9f7c0783c82d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6f73737068702f6d6f73732d73746f726167652f6261646765732f636f7665726167652e706e673f733d66316538616539376362313336303638613935393266626238663639346362333932656332613234)](https://scrutinizer-ci.com/g/mossphp/moss-storage/)

**Storage** is a simple ORM developed for [MOSS framework](https://github.com/mossphp/moss) as completely independent library. In philosophy similar to *Data Mapper* pattern that allows moving data from object instances to database, while keeping them independent of each other.

*Active Record* brakes single responsibility principle (by extending some some base class), bloats entire design... and adds unnecessary coupling. **Storage** approaches this differently. Entities have no direct connection to database, business logic stays uninfluenced by repositories. The only connection between entities and database is in **Storage** itself - in models that describe how entities relate to repositories.

Two examples (assuming that corresponding model exists):

```
$article = $storage->readOne('article')
	->where('id', 123)
	->with('comment', array(array('visible' => true)))
	->execute();
```

This will read article entity with `id=123` and with all its visible comments.

```
$obj = new Article('title', 'text');
$obj->comments = array(
	new Comment('It\'s so simple!', 'comment_author@mail'),
	new Comment('Yup, it is.', 'different_author@mail'),
);

$storage->write($obj)->with('comment')->execute();
```

This would write article entity into database with set comments.

For licence details see LICENCE.md Documentation is available in ./docs/

Requirements
------------

[](#requirements)

Just PHP &gt;= 5.4, Doctrine DBAL and SQL database.

Installation
------------

[](#installation)

Download from [github](https://github.com/mossphp/moss-storage)Or via [Composer](https://getcomposer.org/)

```
	"require": {
		"moss/storage": ">=0.9"
	}
```

Contribute
----------

[](#contribute)

If you want to submit fix or some other enhancements, feel free to do so. Whenever you find a bug it would be nice if you submit it. And if you submit fix - this would be truly amazing!

### How to Contribute

[](#how-to-contribute)

- Fork the **Storage** repository;
- Create a new branch for each feature/improvement/issue;
- Send a pull request from branch

### Style Guide

[](#style-guide)

All pull requests must adhere to the PSR-2 standard. All pull requests must be accompanied by passing PHPUnit tests.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

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

Total

2

Last Release

4400d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8addaf28c1a25afd6006377779228ee980528e4ca23793a4ab8bc426dda5018b?d=identicon)[potfur](/maintainers/potfur)

---

Top Contributors

[![potfur](https://avatars.githubusercontent.com/u/1244857?v=4)](https://github.com/potfur "potfur (422 commits)")

---

Tags

databaseormstoragedata mapper

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/moss-storage/health.svg)

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

###  Alternatives

[laravel-doctrine/migrations

Doctrine Migrations for Laravel

782.8M16](/packages/laravel-doctrine-migrations)[laravel-doctrine/acl

ACL for Laravel and Doctrine

44445.3k7](/packages/laravel-doctrine-acl)[laravel-doctrine/fluent

A fluent PHP mapping driver for Doctrine2.

43430.3k13](/packages/laravel-doctrine-fluent)[wayofdev/laravel-cycle-orm-adapter

🔥 A Laravel adapter for CycleORM, providing seamless integration of the Cycle DataMapper ORM for advanced database handling and object mapping in PHP applications.

3516.7k3](/packages/wayofdev-laravel-cycle-orm-adapter)[hiqdev/yii2-data-mapper

Data Mapper for Yii2

1516.9k1](/packages/hiqdev-yii2-data-mapper)

PHPackages © 2026

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