# cycle/orm

PHP DataMapper, ORM

Repository: https://github.com/cycle/orm
Canonical: https://ross.abutalabs.com/products/cycle-orm
Homepage: https://cycle-orm.dev
Language: PHP
License: MIT
License Family: permissive
Topics: php, orm, cycle, datamapper, query-builder, mapper, hacktoberfest
Last push: 2026-08-09T12:55:14+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 96, release rhythm 89, longevity 100
- inputs: {"age_days": 2856, "days_push": 24, "days_rel": 79, "gap_med": 10.0, "n_releases_24m": 25}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1328, forks 81 (observed 2026-08-28T04:04:22.999121+00:00)

## What it is
Cycle ORM is a PHP DataMapper ORM and data modelling engine with a powerful query builder and dynamic mapping schema. It is designed to work safely in both classic and long-running (daemonized) PHP applications such as RoadRunner.

## Use cases
- map PHP objects to database tables in a PHP application
- build type-safe database queries with a query builder
- model has-one, has-many, many-to-many and polymorphic relations
- run an ORM inside long-running PHP workers like RoadRunner
- manage database schema, migrations and introspection
- implement repositories and unit-of-work persistence patterns
- support multiple databases like MySQL, Postgres, SQLServer and SQLite

## When to choose
- you need a DataMapper-style ORM in PHP with plain old PHP objects
- your app runs in long-lived processes and needs an immutable, disposable-UoW ORM core
- you want flexible schema definition with or without annotations/attributes and code generation
- you need polymorphic relations, single table inheritance, or cyclic graph persistence
- you use the Spiral framework or RoadRunner stack

## When to avoid
- you prefer Laravel Eloquent's Active Record style and tight Laravel integration
- you need a mature ecosystem with as many third-party extensions as Doctrine
- your project is a small script where a lightweight query builder or raw PDO suffices
- you rely on DBMS-specific features beyond Cycle's unified DBAL abstraction

## Facets
- artifact type: library
- maturity: stable
- function: orm, database, database-driver
- domain: databases, web-development, backend, developer-tools
- platform: php, windows
- tags: datamapper, query-builder, php-orm, long-running-applications, roadrunner, data-mapping, spiral-framework, linux, macos, docker, web-server

## Member repositories
- cycle/orm (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:22.999121+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:45:57.188597+00:00, confidence not recorded.
  - readme: https://github.com/cycle/orm (fetched 2026-08-28T04:04:22.999121+00:00, sha 6f2597febf7e)
  - homepage: https://cycle-orm.dev (fetched 2026-08-29T12:04:54.947871+00:00, sha dccfbd6dc975)
  - site_page: https://cycle-orm.dev/docs (fetched 2026-08-29T12:04:54.957398+00:00, sha e41f9f83245a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
