Skip to content

Releases: Nandan108/attrecord

v0.1.0: Initial public release

Choose a tag to compare

@Nandan108 Nandan108 released this 30 Jun 21:09

First public release of attrecord — a lightweight, dependency-free, attribute-driven active-record layer for PHP 8.1+. Declare your schema with PHP attributes and the same metadata drives CRUD, dirty-tracking, batch upserts, eager loading, locking, and DDL.

Highlights

  • 🧩 Attribute-driven#[Table] / #[Column] / #[Relation]; no XML, YAML, or migrations
  • 🏗️ Emit CREATE TABLE from the attributes — single source of truth, MySQL/MariaDB and PostgreSQL
  • ✍️ Dirty trackingsave() writes only changed columns
  • 📦 Single-statement batch upserts (saveAll) + auto-increment-burn-free unique-key upserts
  • 🔗 N+1-free eager loading (with()), including polymorphic relations
  • 🔒 Deadlock-safe locking (LockTier / LockSet / Transaction) + advisory locks — portable across both engines
  • 🧬 Application-minted binary PKs (BINARY(16) / BYTEA UUIDs)
  • Psalm level 1, ~89% line coverage, dual-backend CI (PHP 8.1–8.4 × MySQL 8.0/8.4, MariaDB 10.11/11.4, PostgreSQL 14–17)

Install

composer require nandan108/attrecord

No runtime dependencies.

Documentation