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

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

cycle/orm
=========

PHP DataMapper ORM and Data Modelling Engine

v2.18.0(2w ago)1.3k918.0k↑37.4%84[82 issues](https://github.com/cycle/orm/issues)[3 PRs](https://github.com/cycle/orm/pulls)20MITPHPPHP &gt;=8.1CI passing

Since Feb 18Pushed 2w ago27 watchersCompare

[ Source](https://github.com/cycle/orm)[ Packagist](https://packagist.org/packages/cycle/orm)[ Docs](https://cycle-orm.dev)[ GitHub Sponsors](https://github.com/sponsors/cycle)[ RSS](/packages/cycle-orm/feed)WikiDiscussions 2.x Synced today

READMEChangelog (10)Dependencies (68)Versions (130)Used By (20)

Cycle ORM
=========

[](#cycle-orm)

[![Latest Stable Version](https://camo.githubusercontent.com/a8a160485b7990d9a87b5e062c3dd2d7361e0d279934a1bd36d31b6d3eb926fc/68747470733a2f2f706f7365722e707567782e6f72672f6379636c652f6f726d2f76657273696f6e)](https://packagist.org/packages/cycle/orm)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/bc0188e91c2a5d223f2c65d0ad226755f719aa5da1398b09f5d16723a4dac476/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6379636c652f6f726d2f6261646765732f7175616c6974792d73636f72652e706e673f623d322e78)](https://scrutinizer-ci.com/g/cycle/orm/?branch=2.x)[![Codecov](https://camo.githubusercontent.com/db9e28aee66393133307091b071b1dd28819a624632511339a40c70288b29ba3/68747470733a2f2f636f6465636f762e696f2f67682f6379636c652f6f726d2f67726170682f62616467652e737667)](https://codecov.io/gh/cycle/orm)[![Discord](https://camo.githubusercontent.com/95b39016b98e8abd0cec98583a6f84d1e519665a3141fe51cb4d3622d882a3e6/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d446973636f7264266d6573736167653d63686174266c6f676f3d446973636f726426636f6c6f723d253233353836354632)](https://discord.gg/qF3HpXhMEP)[![Meta Storm Plugin](https://camo.githubusercontent.com/8fd213b4875294275493d687f8e1bd88e3e95cc8e835c3f21879fd39dbdce0b9/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f266c6162656c3d506f77657265642b6279266d6573736167653d4d6574612b53746f726d2b506c7567696e266c6f676f3d70687073746f726d26636f6c6f723d616135356565)](https://github.com/xepozz/meta-storm-idea-plugin)

[![Cycle ORM](https://camo.githubusercontent.com/b5fc2191a52556107291485f49c7c3ed0d978745fba9dfdf0e0c30601e789862/68747470733a2f2f6379636c652d6f726d2e6465762f6379636c652e706e67)](https://camo.githubusercontent.com/b5fc2191a52556107291485f49c7c3ed0d978745fba9dfdf0e0c30601e789862/68747470733a2f2f6379636c652d6f726d2e6465762f6379636c652e706e67)

Cycle is PHP DataMapper, ORM and Data Modelling engine designed to safely work in classic and daemonized PHP applications (like [RoadRunner](https://github.com/spiral/roadrunner)). The ORM provides flexible configuration options to model datasets, powerful query builder and supports dynamic mapping schema. The engine can work with plain PHP objects, support annotation declarations, and proxies via extensions.

 [**Website and Documentation**](https://cycle-orm.dev/docs) | [Comparison with Eloquent and Doctrine](https://github.com/cycle/docs/issues/3)

Features
--------

[](#features)

- ORM with has-one, has-many, many-through-many and polymorphic relations
- Plain Old PHP objects, [AR](https://github.com/https://github.com/cycle/active-record), Custom objects or [same entity type for multiple repositories](https://github.com/cycle/orm/tree/2.x/tests/ORM/Functional/Driver/Common/Classless)
- eager and lazy loading, query builder with multiple fetch strategies
- embedded entities, lazy/eager loaded embedded partials
- runtime configuration with/without code-generation
- column-to-field mapping, single table inheritance, value objects support
- hackable: persist strategies, mappers, relations, transactions
- works with directed graphs and cyclic graphs using command chains
- designed to work in long-running applications: immutable service core, disposable UoW
- supports MySQL, MariaDB, PostgresSQL, SQLServer, SQLite
- schema scaffolding, introspection, migrations and debugging
- supports global query scopes, UUIDs as PK, soft deletes, auto timestamps and macros
- custom column types, FKs to non-primary columns
- use with or without annotations, proxy classes, and auto-migrations
- compatible with Doctrine Collections, Illuminate Collections and custom collections
- compatible with Doctrine Annotations, PHP8 attributes

Extensions
----------

[](#extensions)

ComponentCurrent Status[cycle/active-record](https://github.com/cycle/active-record)[![License](https://camo.githubusercontent.com/cf81fc72334b43c53075dc289e08ceabfa55b4e76d0a560c34a22c8dc51cf940/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f6163746976652d7265636f72642e7376673f7374796c653d666c61742d737175617265266c6162656c3d)](https://camo.githubusercontent.com/cf81fc72334b43c53075dc289e08ceabfa55b4e76d0a560c34a22c8dc51cf940/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f6163746976652d7265636f72642e7376673f7374796c653d666c61742d737175617265266c6162656c3d) [![PHP](https://camo.githubusercontent.com/32e9425e112eb72a257d577044d8229871a1292045bc988edf2c75c51073e05a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6379636c652f6163746976652d7265636f72642e7376673f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://packagist.org/packages/cycle/active-record) [![Stable Release](https://camo.githubusercontent.com/1b646ffec10b19f5daeb8df03a805f61944b9b3132360c7dedf960984659e868/68747470733a2f2f706f7365722e707567782e6f72672f6379636c652f6163746976652d7265636f72642f76657273696f6e3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/active-record) [![Total Downloads](https://camo.githubusercontent.com/17a11f5d97a8a84b504ffec54d535f76a923feb0c519fcc3c8001fb0d63f3602/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6379636c652f6163746976652d7265636f72642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/active-record/stats)[cycle/schema-builder](https://github.com/cycle/schema-builder)[![License](https://camo.githubusercontent.com/a85892995a6ad343fc866edef29bc26f2b855daf1948f8639e8100e23008aa49/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f736368656d612d6275696c6465722e7376673f7374796c653d666c61742d737175617265266c6162656c3d)](https://camo.githubusercontent.com/a85892995a6ad343fc866edef29bc26f2b855daf1948f8639e8100e23008aa49/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f736368656d612d6275696c6465722e7376673f7374796c653d666c61742d737175617265266c6162656c3d) [![PHP](https://camo.githubusercontent.com/b5c22de9c526c90a35554159ad41aac90e76ecf5eec87a23ffe05153e2fc18c2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6379636c652f736368656d612d6275696c6465722e7376673f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://packagist.org/packages/cycle/schema-builder) [![Stable Release](https://camo.githubusercontent.com/4e483a01f4c951a957c008d91803be51d34fc0162276e02aa99dcada76f7d619/68747470733a2f2f706f7365722e707567782e6f72672f6379636c652f736368656d612d6275696c6465722f76657273696f6e3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/schema-builder) [![Total Downloads](https://camo.githubusercontent.com/96613ac7542891167ce5284bd53ad5c54ff530ffd473ba6bcff3e739ef615e4a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6379636c652f736368656d612d6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/schema-builder/stats)[cycle/schema-renderer](https://github.com/cycle/schema-renderer)[![License](https://camo.githubusercontent.com/eeed937d84736f1845fba68218bc9e8607437b695a86ec31fc8d414481955e88/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f736368656d612d72656e64657265722e7376673f7374796c653d666c61742d737175617265266c6162656c3d)](https://camo.githubusercontent.com/eeed937d84736f1845fba68218bc9e8607437b695a86ec31fc8d414481955e88/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f736368656d612d72656e64657265722e7376673f7374796c653d666c61742d737175617265266c6162656c3d) [![PHP](https://camo.githubusercontent.com/58c9aef7db9b90d299efeb3f5f3e01e95cf494c6cdb8b26d88669937c7261eb3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6379636c652f736368656d612d72656e64657265722e7376673f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://packagist.org/packages/cycle/schema-renderer) [![Stable Release](https://camo.githubusercontent.com/336045119d2c034a01cadffff99e4e658b544b8b92b3172ded43c0be34ed4a6a/68747470733a2f2f706f7365722e707567782e6f72672f6379636c652f736368656d612d72656e64657265722f76657273696f6e3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/schema-renderer) [![Total Downloads](https://camo.githubusercontent.com/631aac939115ef79617dadc307efc867df7eb35059f629f2f14abfe1d5acf41d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6379636c652f736368656d612d72656e64657265722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/schema-renderer/stats)[cycle/schema-provider](https://github.com/cycle/schema-provider)[![License](https://camo.githubusercontent.com/13af5e2888775edfdedad59746c307ce595abff24d0ff0a3ca93998fccb494e7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f736368656d612d70726f76696465722e7376673f7374796c653d666c61742d737175617265266c6162656c3d)](https://camo.githubusercontent.com/13af5e2888775edfdedad59746c307ce595abff24d0ff0a3ca93998fccb494e7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f736368656d612d70726f76696465722e7376673f7374796c653d666c61742d737175617265266c6162656c3d) [![PHP](https://camo.githubusercontent.com/ce3c8b63d599af9d68fee301d5dc837399b08750fd3ad2c8ccdf97e2628d2460/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6379636c652f736368656d612d70726f76696465722e7376673f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://packagist.org/packages/cycle/schema-provider) [![Stable Release](https://camo.githubusercontent.com/5d9ef38c0ce1b228503c738059c776852dd494871410f3e843cd28e75ce87b97/68747470733a2f2f706f7365722e707567782e6f72672f6379636c652f736368656d612d70726f76696465722f76657273696f6e3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/schema-provider) [![Total Downloads](https://camo.githubusercontent.com/ba4c58405c46bc30f3126ee59ea3d1c20df7323ec5eb2a69c676c5209d6212ae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6379636c652f736368656d612d70726f76696465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/schema-provider/stats)[cycle/annotated](https://github.com/cycle/annotated)[![License](https://camo.githubusercontent.com/d1af60695761f9bc4f722ec30d3164a9006ea6bea8fcfa101028423127a78351/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f616e6e6f74617465642e7376673f7374796c653d666c61742d737175617265266c6162656c3d)](https://camo.githubusercontent.com/d1af60695761f9bc4f722ec30d3164a9006ea6bea8fcfa101028423127a78351/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f616e6e6f74617465642e7376673f7374796c653d666c61742d737175617265266c6162656c3d) [![PHP](https://camo.githubusercontent.com/dc57f95c2aab3faea5f6706d9b2e9ed2eeb3bfacfd7be9f8b992f1fcd14cd964/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6379636c652f616e6e6f74617465642e7376673f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://packagist.org/packages/cycle/annotated) [![Stable Release](https://camo.githubusercontent.com/3c1447a577ec9e3b0f9a85de8955caaba5b60cd208c58aa1927007633855d7ec/68747470733a2f2f706f7365722e707567782e6f72672f6379636c652f616e6e6f74617465642f76657273696f6e3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/annotated) [![Total Downloads](https://camo.githubusercontent.com/78ecee8bf7b1848882cfbb2b60bb9d5d374f18ad8e3a4a60c9729eeca2f7289e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6379636c652f616e6e6f74617465642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/annotated/stats)[cycle/migrations](https://github.com/cycle/migrations)[![License](https://camo.githubusercontent.com/24990ae11429436524179e635f9a6fc3c043c99718f1db13aaf014c923446834/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f6d6967726174696f6e732e7376673f7374796c653d666c61742d737175617265266c6162656c3d)](https://camo.githubusercontent.com/24990ae11429436524179e635f9a6fc3c043c99718f1db13aaf014c923446834/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f6d6967726174696f6e732e7376673f7374796c653d666c61742d737175617265266c6162656c3d) [![PHP](https://camo.githubusercontent.com/3929aca092d92ffa83e8e32e7041d993daac2490a1baf3082e3c289c03f90526/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6379636c652f6d6967726174696f6e732e7376673f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://packagist.org/packages/cycle/migrations) [![Stable Release](https://camo.githubusercontent.com/320d432d108e945cf0f36de35753d8b943b7bdf7b74f3e23c0867863dae13e8c/68747470733a2f2f706f7365722e707567782e6f72672f6379636c652f6d6967726174696f6e732f76657273696f6e3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/migrations) [![Total Downloads](https://camo.githubusercontent.com/12ba7fc1a2e5d05b82b11a78ec39f0a72364f538f16c34a5524dbfab83268ddf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6379636c652f6d6967726174696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/migrations/stats)[cycle/entity-behavior](https://github.com/cycle/entity-behavior)[![License](https://camo.githubusercontent.com/7926509473653638171a7d780142d9e48a6a5d7f4dfd036c7223adb6e0549b2b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f656e746974792d6265686176696f722e7376673f7374796c653d666c61742d737175617265266c6162656c3d)](https://camo.githubusercontent.com/7926509473653638171a7d780142d9e48a6a5d7f4dfd036c7223adb6e0549b2b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f656e746974792d6265686176696f722e7376673f7374796c653d666c61742d737175617265266c6162656c3d) [![PHP](https://camo.githubusercontent.com/06f85eb9b02a1dc1f423315683b0877caf0b2dedb9dbb510cefc00ceffb4d19d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6379636c652f656e746974792d6265686176696f722e7376673f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://packagist.org/packages/cycle/entity-behavior) [![Stable Release](https://camo.githubusercontent.com/464d845027c246183c103c2632b23da63c4e35d5aa2f9308de313a6a85bc411e/68747470733a2f2f706f7365722e707567782e6f72672f6379636c652f656e746974792d6265686176696f722f76657273696f6e3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/entity-behavior) [![Total Downloads](https://camo.githubusercontent.com/803d5ec50cefb30bf8cb600d1705053ed6d7bfa335c54aac9fc052bc0b0f49cd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6379636c652f656e746974792d6265686176696f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/entity-behavior/stats)[cycle/entity-behavior-uuid](https://github.com/cycle/entity-behavior-uuid)[![License](https://camo.githubusercontent.com/0f77e49301495bdd8a792eb119c1433b0e1614b88b599e8460c6b6c2e55e66f7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f656e746974792d6265686176696f722d757569642e7376673f7374796c653d666c61742d737175617265266c6162656c3d)](https://camo.githubusercontent.com/0f77e49301495bdd8a792eb119c1433b0e1614b88b599e8460c6b6c2e55e66f7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f656e746974792d6265686176696f722d757569642e7376673f7374796c653d666c61742d737175617265266c6162656c3d) [![PHP](https://camo.githubusercontent.com/fe4b14c23c94f5b39492d4337307b8ae79b3f568be07422540844ec240bf9d47/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6379636c652f656e746974792d6265686176696f722d757569642e7376673f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://packagist.org/packages/cycle/entity-behavior-uuid) [![Stable Release](https://camo.githubusercontent.com/408173d6ad7d8876b53347603301a63a539db317819b15339709f38badf6d577/68747470733a2f2f706f7365722e707567782e6f72672f6379636c652f656e746974792d6265686176696f722d757569642f76657273696f6e3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/entity-behavior-uuid) [![Total Downloads](https://camo.githubusercontent.com/123a0f80bf271936a2aea39e2b2c5404f5233a3647b330f50100a058d8b8e16f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6379636c652f656e746974792d6265686176696f722d757569642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/entity-behavior-uuid/stats)[cycle/database](https://github.com/cycle/database)[![License](https://camo.githubusercontent.com/48dc333e64ef273bf16a014089ce5f2b41af6264a98be589320b1961fdbcc56d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f64617461626173652e7376673f7374796c653d666c61742d737175617265266c6162656c3d)](https://camo.githubusercontent.com/48dc333e64ef273bf16a014089ce5f2b41af6264a98be589320b1961fdbcc56d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f64617461626173652e7376673f7374796c653d666c61742d737175617265266c6162656c3d) [![PHP](https://camo.githubusercontent.com/6c5818f3229d12dd0779c8564022041a96f76cf9af240add9b3cb6d4e8c07093/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6379636c652f64617461626173652e7376673f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://packagist.org/packages/cycle/database) [![Stable Release](https://camo.githubusercontent.com/76fcd58b8829bb144e0daaf9066740b64db8ae9373ff668b7c6166015f182541/68747470733a2f2f706f7365722e707567782e6f72672f6379636c652f64617461626173652f76657273696f6e3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/database) [![Total Downloads](https://camo.githubusercontent.com/b26e2c5d2e2cdeec2b768f70147dc2307747222b39ee769179aaa7ba1400d176/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6379636c652f64617461626173652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/database/stats)[cycle/schema-migrations-generator](https://github.com/cycle/schema-migrations-generator)[![License](https://camo.githubusercontent.com/899ce9b9985614670afb4dde00a52d113789fe0c6bbc145247ae6c0a46ce6137/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f736368656d612d6d6967726174696f6e732d67656e657261746f722e7376673f7374796c653d666c61742d737175617265266c6162656c3d)](https://camo.githubusercontent.com/899ce9b9985614670afb4dde00a52d113789fe0c6bbc145247ae6c0a46ce6137/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f736368656d612d6d6967726174696f6e732d67656e657261746f722e7376673f7374796c653d666c61742d737175617265266c6162656c3d) [![PHP](https://camo.githubusercontent.com/e8766bc17b6dfdaf03fc5407795d346fdf5bc9e8d07dd33b87536b99d953a472/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6379636c652f736368656d612d6d6967726174696f6e732d67656e657261746f722e7376673f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://packagist.org/packages/cycle/schema-migrations-generator) [![Stable Release](https://camo.githubusercontent.com/689bb0bdb90e3e08b782b05e7aeaa2f4bf5a1a60c6200653a948e8a27e37a8a3/68747470733a2f2f706f7365722e707567782e6f72672f6379636c652f736368656d612d6d6967726174696f6e732d67656e657261746f722f76657273696f6e3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/schema-migrations-generator) [![Total Downloads](https://camo.githubusercontent.com/bec56174700dc7071445a0eb73d63549e3596d586426b152555961ac847e8536/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6379636c652f736368656d612d6d6967726174696f6e732d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/schema-migrations-generator/stats)[cycle/orm-promise-mapper](https://github.com/cycle/orm-promise-mapper)[![License](https://camo.githubusercontent.com/2fcd31fdd924169567517abdb1fd6017f20d04fc08d658d0c6c7836e1eb8580c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f6f726d2d70726f6d6973652d6d61707065722e7376673f7374796c653d666c61742d737175617265266c6162656c3d)](https://camo.githubusercontent.com/2fcd31fdd924169567517abdb1fd6017f20d04fc08d658d0c6c7836e1eb8580c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6379636c652f6f726d2d70726f6d6973652d6d61707065722e7376673f7374796c653d666c61742d737175617265266c6162656c3d) [![PHP](https://camo.githubusercontent.com/51495a0038c5846e523a58566878a3efb463fd8780240b2d236c42ee11b010c3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6379636c652f6f726d2d70726f6d6973652d6d61707065722e7376673f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://packagist.org/packages/cycle/orm-promise-mapper) [![Stable Release](https://camo.githubusercontent.com/5b83f1792ebea9205eff5a9bc2144bc0ea1fa63b2d7b2e52a0be2ba0eacb9ae2/68747470733a2f2f706f7365722e707567782e6f72672f6379636c652f6f726d2d70726f6d6973652d6d61707065722f76657273696f6e3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/orm-promise-mapper) [![Total Downloads](https://camo.githubusercontent.com/f01a5e6f3325aa45b4bfbfc8fcd2b232bb27544fe344aaf01a563861d8e5a1e2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6379636c652f6f726d2d70726f6d6973652d6d61707065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cycle/orm-promise-mapper/stats)Example:
--------

[](#example)

```
// load all active users and pre-load their paid orders sorted from newest to olders
// the pre-load will be complete using LEFT JOIN
$users = $orm->getRepository(User::class)
    ->select()
    ->where('active', true)
    ->load('orders', [
        'method' => Select::SINGLE_QUERY,
        'load'   => function($q) {
            $q->where('paid', true)->orderBy('timeCreated', 'DESC');
        }
    ])
    ->fetchAll();

$em = new EntityManager($orm);

foreach($users as $user) {
    $em->persist($user);
}

$em->run();
```

License:
--------

[](#license)

Cycle ORM is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). Maintained by [Spiral Scout](https://spiralscout.com).

###  Health Score

76

—

ExcellentBetter than 100% of packages

Maintenance95

Actively maintained with recent releases

Popularity63

Solid adoption and visibility

Community47

Growing community involvement

Maturity87

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 67.5% 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 ~22 days

Recently: every ~7 days

Total

119

Last Release

19d ago

Major Versions

0.3a → v1.0.02019-03-28

v1.8.0 → v2.0.02021-12-22

v1.8.1 → v2.0.12022-01-20

1.x-dev → 2.11.0-RC12025-05-04

PHP version history (7 changes)v0.1aPHP ^7.1|^8.0

0.3aPHP ^7.1

v1.1.15PHP ^7.2

v1.2.17PHP ^7.2|^8.0

v1.3.0PHP &gt;=7.2

v2.0.0PHP &gt;=8.0

v2.14.0PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/796136?v=4)[Anton Tsitou](/maintainers/wolfy-j)[@wolfy-j](https://github.com/wolfy-j)

---

Top Contributors

[![wolfy-j](https://avatars.githubusercontent.com/u/796136?v=4)](https://github.com/wolfy-j "wolfy-j (1042 commits)")[![roxblnfk](https://avatars.githubusercontent.com/u/4152481?v=4)](https://github.com/roxblnfk "roxblnfk (310 commits)")[![msmakouz](https://avatars.githubusercontent.com/u/67324318?v=4)](https://github.com/msmakouz "msmakouz (42 commits)")[![gam6itko](https://avatars.githubusercontent.com/u/3841197?v=4)](https://github.com/gam6itko "gam6itko (30 commits)")[![butschster](https://avatars.githubusercontent.com/u/773481?v=4)](https://github.com/butschster "butschster (22 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (13 commits)")[![mrakolice](https://avatars.githubusercontent.com/u/4227668?v=4)](https://github.com/mrakolice "mrakolice (13 commits)")[![thenotsoft](https://avatars.githubusercontent.com/u/44147615?v=4)](https://github.com/thenotsoft "thenotsoft (12 commits)")[![SerafimArts](https://avatars.githubusercontent.com/u/2461257?v=4)](https://github.com/SerafimArts "SerafimArts (10 commits)")[![puzzledpolymath](https://avatars.githubusercontent.com/u/162779269?v=4)](https://github.com/puzzledpolymath "puzzledpolymath (7 commits)")[![lotyp](https://avatars.githubusercontent.com/u/94047334?v=4)](https://github.com/lotyp "lotyp (7 commits)")[![pine3ree](https://avatars.githubusercontent.com/u/3229979?v=4)](https://github.com/pine3ree "pine3ree (6 commits)")[![BelaRyc](https://avatars.githubusercontent.com/u/25685175?v=4)](https://github.com/BelaRyc "BelaRyc (4 commits)")[![alexndr-novikov](https://avatars.githubusercontent.com/u/7372962?v=4)](https://github.com/alexndr-novikov "alexndr-novikov (3 commits)")[![tntrex](https://avatars.githubusercontent.com/u/3947942?v=4)](https://github.com/tntrex "tntrex (3 commits)")[![rustamwin](https://avatars.githubusercontent.com/u/16498265?v=4)](https://github.com/rustamwin "rustamwin (2 commits)")[![vjik](https://avatars.githubusercontent.com/u/525501?v=4)](https://github.com/vjik "vjik (2 commits)")[![vvval](https://avatars.githubusercontent.com/u/11367763?v=4)](https://github.com/vvval "vvval (2 commits)")[![rauanmayemir](https://avatars.githubusercontent.com/u/9691?v=4)](https://github.com/rauanmayemir "rauanmayemir (2 commits)")[![hiscaler](https://avatars.githubusercontent.com/u/1013287?v=4)](https://github.com/hiscaler "hiscaler (1 commits)")

---

Tags

cycledatamapperhacktoberfestmapperormphpquery-builderormmysqlsqlitepostgresqlsqlmssqlquery builderdata mapper

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[cycle/database

DBAL, schema introspection, migration and pagination

71777.8k53](/packages/cycle-database)[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k605.0M6.8k](/packages/doctrine-dbal)[catfan/medoo

The lightweight PHP database framework to accelerate development

5.0k1.6M204](/packages/catfan-medoo)[usmanhalalit/pixie

A lightweight, expressive, framework agnostic query builder for PHP.

6882.2M16](/packages/usmanhalalit-pixie)[ezsql/ezsql

Advance database access library. Make interacting with a database ridiculously easy. An universal interchangeable CRUD system.

86849.1k](/packages/ezsql-ezsql)[jv2222/ezsql

Advance database access library. Make interacting with a database ridiculously easy. An universal interchangeable CRUD system.

87211.6k2](/packages/jv2222-ezsql)

PHPackages © 2026

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