All notable changes to EntityForge are documented here.
v2.2.0 — 2026-07-01
- Dynamic Schema Extension — opt-in
"metadata": trueflag in entity JSON schemas emits ametadata JSON NULLcolumn in the migration and exposesgetMeta,setMeta, andgetAllMetaonBaseRepository. Allows tenants to store arbitrary custom field values without schema changes. tenant_fieldsregistry table — auto-created byCoreSchemaManageron boot. Stores per-tenant custom field definitions (name, type, label, required). Works with bothsharedanddatabasetenancy strategies.TenantFieldRegistry— new class for registering, listing, and removing custom field definitions per tenant. Includesvalidate()for checking submitted values against registered definitions.field:addCLI command —php bin/ef field:add <entity> <field_name> <type> --tenant=<id> [--label] [--required]field:listCLI command —php bin/ef field:list <entity> --tenant=<id>field:removeCLI command —php bin/ef field:remove <id> --tenant=<id>- Added
keywords,homepage, andauthorstocomposer.jsonfor Packagist discoverability.
v2.1.1 — 2026-06-27
- Minor stability and test coverage improvements.
v2.1.0 — 2026-06-27
migrate:all-tenantscommand — runs pending migrations across every active tenant DB in parallel (configurable via--parallel N, default 5). Suspended tenants are skipped. Per-tenant failures are reported without halting other tenants.TenantService::suspend(),resume(), andoffboard()— full tenant lifecycle management.offboard()drops the tenant DB (database strategy) and removes the registry entry atomically.- Suspended tenants are blocked at
Application::boot()—assertTenantActive()throws before any repository is instantiated. TenantProvisionerrolls back atomically on migration failure — if migrations fail after the DB is created, the DB is dropped before re-throwing. No orphaned databases.RequestLifecycle::begin()/end()— safe wrappers for persistent runtimes (Swoole, RoadRunner, Octane) that clearTenantContextand flush the connection cache between requests.- Four tenant resolvers:
header,subdomain,jwt,session. Configurable viatenancy.resolverinapplication.yaml. make:middlewareandmake:controllerscaffolding commands.- Streaming response support via
Response::stream(callable). Request::withAttribute()/getAttribute()— middleware-to-handler attribute passing.
v2.0.0 — 2026-06-14
- Initial public release.
- Configuration-driven code generation from JSON entity schemas:
EntityBuilder,RepositoryBuilder,MigrationBuilder. - Two tenancy strategies:
shared(tenant_id column scoping) anddatabase(one DB per tenant). BaseRepositorywithcreate,findAll,findById,where,update,delete, and transaction methods. Column names validated against^[a-zA-Z0-9_]+$before SQL interpolation.CoreSchemaManager— idempotenttenantstable creation on every boot.MigrationRunner— batch-tracked forward and rollback migrations with dry-run mode.- HTTP layer:
Router(FastRoute), immutablePipeline, immutableRequest/Response. - DI container with
bind,singleton,instance, and reflection-based autowire. TenantContextstatic singleton withLogicExceptionguard against double-set.generate,generate:all,migrate,migrate:rollback,tenant:createCLI commands.