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

ActiveSemitexa-module[Database &amp; ORM](/categories/database)

semitexa/orm
============

Semitexa ORM — attribute-driven schema, connection pooling, MySQL adapter

2026.06.21.0352(1w ago)114014MITPHPPHP ^8.4

Since Apr 1Pushed 1w agoCompare

[ Source](https://github.com/semitexa/semitexa-orm)[ Packagist](https://packagist.org/packages/semitexa/orm)[ RSS](/packages/semitexa-orm/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (17)Versions (39)Used By (14)

Semitexa ORM
============

[](#semitexa-orm)

Attribute-driven ORM with schema definition, connection pooling, and MySQL 8.0+ support.

> **Schema migrations are owned by this package.** `orm:diff` (preview) and `orm:sync` (apply) are the only entry points that change database structure. Other Semitexa packages — including [`semitexa/update`](https://github.com/semitexa/semitexa-update/blob/master/README.md) — must not issue schema DDL; they call ORM through a public seam and the ORM remains the source of truth for what the schema should look like. Post-schema *data* patches (backfills, normalizations) belong to `semitexa/update`.

Purpose
-------

[](#purpose)

Maps PHP classes to database tables using PHP 8.4 attributes. Provides Swoole-compatible connection pooling, typed column definitions, relation mapping, and a filtering architecture with auto-indexed filterable fields.

The source of truth for schema is the entity classes themselves (`#[FromTable]`, `#[Column]`, `#[Index]`, `#[BelongsTo]`/`#[HasMany]`/etc.). There is no canonical `migrations/` directory in a Semitexa project — the diff/sync engine produces the necessary DDL from the entity model, applies safe-rename / deprecate-then-drop policies, and gates destructive operations behind an explicit operator opt-in.

Role in Semitexa
----------------

[](#role-in-semitexa)

Depends on Core and Tenancy. Depended on by Cache, Media, Scheduler, Search, Storage, Workflow, and Platform modules. Central persistence layer for all database-backed functionality.

Key Features
------------

[](#key-features)

- `#[FromTable]`, `#[Column]`, `#[PrimaryKey]`, `#[Index]` for schema definition
- Relations: `#[BelongsTo]`, `#[HasMany]`, `#[OneToOne]`, `#[ManyToMany]`
- `#[Filterable]` with auto-indexing and typed `filterByX()` methods
- `#[Aggregate]` for virtual computed fields
- Traits: `HasTimestamps`, `SoftDeletes`, `HasUuid`, `HasUuidV7` (BINARY(16) chronological)
- Domain mapping via `ResourceModel`, `#[AsMapper]`, and `DomainRepository`
- Swoole `Channel`-based connection pool
- MySQL 8.0+ with version detection and capability checks
- `SchemaCollector` for attribute-driven schema sync

Notes
-----

[](#notes)

ORM resources go in `Application/Db/MySQL/Model/`. Domain entities live in `Domain/Model/`. The `Resource` folder is reserved for response DTOs. Connection pooling is Swoole-native using Channel-based leasing.

Operator commands
-----------------

[](#operator-commands)

CommandPurpose`orm:status`Show driver capabilities, schema summary, and pending diff`orm:diff`Print the DDL plan to bring the database in sync with the entity model`orm:sync`Execute the DDL plan; supports `--dry-run` and `--allow-destructive``orm:seed`Apply data seeds (fixture data) declared by entity factoriesUpdate orchestration calls `orm:sync` through `Semitexa\Update\Domain\Contract\OrmMigrationGatewayInterface` — never by reaching into ORM internals.

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance94

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 55.7% 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 ~3 days

Recently: every ~15 days

Total

35

Last Release

12d ago

Major Versions

1.0.23 → 2026.04.03.12402026-04-03

### Community

Maintainers

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

---

Top Contributors

[![syntaxwanderer](https://avatars.githubusercontent.com/u/1311643?v=4)](https://github.com/syntaxwanderer "syntaxwanderer (83 commits)")[![goosyboosy](https://avatars.githubusercontent.com/u/13351014?v=4)](https://github.com/goosyboosy "goosyboosy (32 commits)")[![needalicense](https://avatars.githubusercontent.com/u/13330467?v=4)](https://github.com/needalicense "needalicense (32 commits)")[![tarashanych](https://avatars.githubusercontent.com/u/49571976?v=4)](https://github.com/tarashanych "tarashanych (2 commits)")

---

Tags

attributesmysqlormschemasemitexaschemaormmysqlattributessemitexa

### Embed Badge

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

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

###  Alternatives

[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58825.9M54](/packages/scienta-doctrine-json-functions)[dunglas/doctrine-json-odm

An object document mapper for Doctrine ORM using JSON types of modern RDBMS.

6315.5M13](/packages/dunglas-doctrine-json-odm)[cycle/orm

PHP DataMapper ORM and Data Modelling Engine

1.3k917.0k77](/packages/cycle-orm)[creof/doctrine2-spatial

Doctrine2 multi-platform support for spatial types and functions

2733.4M11](/packages/creof-doctrine2-spatial)[mmucklo/queue-bundle

Symfony2/3/4/5 Queue Bundle (for background jobs) supporting Mongo (Doctrine ODM), Mysql (and any Doctrine ORM), RabbitMQ, Beanstalkd, Redis, and ... {write your own}

121942.6k](/packages/mmucklo-queue-bundle)[longitude-one/doctrine-spatial

Doctrine multi-platform support for spatial types and functions, compliant with Doctrine 2.19, 3.1, and dev ones (3.2 and 4.0).

911.7M1](/packages/longitude-one-doctrine-spatial)

PHPackages © 2026

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