PHPackages                             saygoweb/anorm - 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. saygoweb/anorm

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

saygoweb/anorm
==============

Another ORM for PHP

v3.1.1(1mo ago)1865[1 PRs](https://github.com/saygoweb/anorm/pulls)MITPHPCI passing

Since Nov 30Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/saygoweb/anorm)[ Packagist](https://packagist.org/packages/saygoweb/anorm)[ RSS](/packages/saygoweb-anorm/feed)WikiDiscussions master Synced 3w ago

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

Anorm: Another ORM for PHP
==========================

[](#anorm-another-orm-for-php)

[![CI](https://github.com/saygoweb/anorm/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/saygoweb/anorm/actions/workflows/ci.yml?query=branch%3Amaster)[![Code Quality](https://github.com/saygoweb/anorm/actions/workflows/quality.yml/badge.svg?branch=master)](https://github.com/saygoweb/anorm/actions/workflows/quality.yml?query=branch%3Amaster)[![Coverage Status](https://camo.githubusercontent.com/59beb8de462ad57ae53b84b5e46a4c4bd7ea4d4f14aa89b702ea9231d200c689/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f736179676f7765622f616e6f726d2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/saygoweb/anorm?branch=master)[![MIT Licence](https://camo.githubusercontent.com/fabb40ab22588a0746bb0916ed92739171bde7fb31f281c627aa588bcba62cc2/68747470733a2f2f6261646765732e66726170736f66742e636f6d2f6f732f6d69742f6d69742e7376673f763d313033)](https://opensource.org/licenses/mit-license.php)

Yes, yet another ORM for PHP. This meets my needs for an ORM with the following characteristics:

- Works well with legacy databases.
- Provides (requires) a Model class which helps coding in IDEs.
- Creates and modifies the underlying database schema as required to match the Model.

Features
--------

[](#features)

- Provides a tool 'anorm' for quickly generating models from existing tables.
- Maps between camelCase property names and under\_score field names common in database schema.
- Makes CRUD operations extremely simple.
- Doesn't get in the way of complex queries.
- Optional lifecycle hook for change detection — see [docs/\_docs/lifecycle.md](docs/_docs/lifecycle.md).

Documentation
-------------

[](#documentation)

Documentation is available on the [docs site](https://saygoweb.github.io/anorm).

Development
-----------

[](#development)

### Quick Start

[](#quick-start)

```
# Install dependencies
composer install

# Run tests
composer test

# Run tests with coverage
composer test:coverage

# Check code quality
composer quality
```

### Requirements

[](#requirements)

- PHP 7.4+ (tested on 7.4, 8.0, 8.1, 8.2, 8.3)
- MySQL/MariaDB
- Composer

### Available Commands

[](#available-commands)

- `composer test` - Run full test suite
- `composer test:quick` - Run tests without coverage
- `composer test:coverage` - Run tests with HTML coverage report
- `composer test:ci` - Run tests with clover coverage for CI
- `composer cs:check` - Check code style (PSR-12)
- `composer cs:fix` - Fix code style issues
- `composer analyze` - Run static analysis (PHPStan)
- `composer quality` - Run all quality checks
- `composer ci` - Run full CI suite (tests + quality)

See [DEVELOPERS.md](DEVELOPERS.md) for detailed development instructions.

Contributing
------------

[](#contributing)

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Run `composer ci` to ensure all tests pass and code quality is maintained
5. Submit a pull request

All pull requests are automatically tested on multiple PHP versions with comprehensive code quality checks.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance90

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 98.3% 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 ~87 days

Recently: every ~44 days

Total

32

Last Release

51d ago

Major Versions

v0.9.2 → v1.0.02019-03-16

v1.8.1 → v2.0.02025-10-13

v2.0.0 → v3.0.02025-10-14

v1.8.2 → v2.0.12025-11-09

v2.0.1 → v3.0.12025-11-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/7855ef42b32064e487bf3784ce6ff0c167a4a16841f6cc0f69b8c6abe2d9028c?d=identicon)[cambell-prince](/maintainers/cambell-prince)

---

Top Contributors

[![cambell-prince](https://avatars.githubusercontent.com/u/599797?v=4)](https://github.com/cambell-prince "cambell-prince (116 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

databaseormphp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/saygoweb-anorm/health.svg)

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[cjp2600/bim-core

Bitrix db migration core libs

558.9k1](/packages/cjp2600-bim-core)

PHPackages © 2026

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