Releases: vedavith/Entity-Forge
Release list
v2.2.1 - CI/CD pipeline Improvements
Entity Forge v2.2.1
Release Date: July 2026
🚀 Overview
This release focuses on improving stability, PHP compatibility, testing, and the overall developer experience. It introduces enhancements to the CI/CD pipeline and improves the quality assurance process across supported PHP versions.
✨ What's New
CI/CD
- Added scheduled GitHub Actions workflows for continuous validation.
- Improved automated testing across PHP 8.3, 8.4, and 8.5.
- Added Composer validation during CI.
- Improved dependency caching for faster workflow execution.
Testing & Code Quality
- Added automated PHPStan static analysis.
- Improved PHPUnit execution and reporting.
- Added code coverage generation.
- Enforced a minimum 80% line coverage threshold during CI.
PHP Compatibility
- Added support for PHP 8.5.
- Continued support for PHP 8.3 and PHP 8.4.
- Improved compatibility with the latest Composer ecosystem.
Performance
- Optimized Composer dependency installation.
- Improved CI execution speed through dependency caching.
Developer Experience
- Improved development workflow.
- Enhanced automated validation.
- General maintenance and internal code quality improvements.
📦 Installation
Install the latest version:
composer require entity-forge/entity-forge:^2.2.1Or update an existing installation:
composer update entity-forge/entity-forge🙌 Thank You
Thank you for using Entity Forge. Feedback, issues, and contributions are always welcome!
Full Changelog: v2.2.0...v2.2.1
v2.2.0 — Dynamic Schema Extension
What's new
Dynamic Schema Extension
Tenants can now define custom fields on any entity without touching migrations.
Add "metadata": true to an entity schema to opt in:
```json
{
"entity": "Account",
"metadata": true,
"fields": { "name": "string" }
}
```
This emits a `metadata JSON NULL` column in the migration and exposes three new repository methods:
```php
$repo->setMeta(42, 'vat_number', 'GB123456789');
$repo->getMeta(42, 'vat_number'); // 'GB123456789'
$repo->getAllMeta(42); // ['vat_number' => 'GB123456789']
```
Custom Field CLI
Manage per-tenant field definitions from the command line:
```bash
php bin/ef field:add accounts vat_number string --tenant=beta --label="VAT Number"
php bin/ef field:list accounts --tenant=beta
php bin/ef field:remove 1 --tenant=beta
```
tenant_fields registry table
`CoreSchemaManager` now auto-creates a `tenant_fields` table on boot to store field definitions. Works with both `shared` and `database` tenancy strategies.
Other changes
- Added keywords, homepage, and authors to `composer.json` for Packagist discoverability
- Expanded README with Dynamic Schema Extension usage examples and updated CLI reference table
Full changelog
v2.1.1 — Multi-tenant SaaS framework
What's Changed
bin/efautoload path — Fixed resolution when installed as a Composer dependency (previously resolved inside the vendor package directory)- Console commands config path — All CLI commands now use
getcwd() . '/config'instead of__DIR__-relative paths, so they work correctly from any project root - Table name pluralisation — Added
Str::toTableName()with proper snake_case and English pluralisation (JournalEntry→journal_entries, notjournalentrys). Used consistently acrossMigrationBuilder,EntityBuilder, andBaseRepository - Strategy-aware migrations —
MigrationBuildernow accepts a$strategyparameter;tenant_idcolumn is only emitted for thesharedstrategy.GenerateCommandandGenerateAllCommandreadtenancy.strategyfromconfig/application.yamland pass it through - Tenant-scoped unique indexes — Unique indexes in
sharedstrategy automatically prependtenant_idas the first column, preventing cross-tenant unique constraint violations - FK columns —
belongsTorelations now emitINT NOT NULLFK columns (previously missingNOT NULL) datetimetype — Maps toDATETIMESQL type (previously fell through toTEXT)BaseRepository::create()— Now returns the inserted row withidpopulated vialastInsertId()MigrationRunneroutput — Accepts an injectable?callable $outputin the constructor; defaults toecho. Console commands inject$output->writeln()for Symfony Console formattingTenantService::onboard()— Only callsTenantProvisioner::create()fordatabasestrategy;sharedstrategy registers the tenant row without provisioning a databaseRequest::capture()— Detectsapplication/jsonContent-Type and parsesphp://inputinstead of relying on$_POST. Addedjson()helper method.
v2.1.0 — Multi-tenant SaaS framework
bin/efautoload path — Fixed resolution when installed as a Composer dependency (previously resolved inside the vendor package directory)- Console commands config path — All CLI commands now use
getcwd() . '/config'instead of__DIR__-relative paths, so they work correctly from any project root - Table name pluralisation — Added
Str::toTableName()with proper snake_case and English pluralisation (JournalEntry→journal_entries, notjournalentrys). Used consistently acrossMigrationBuilder,EntityBuilder, andBaseRepository - Strategy-aware migrations —
MigrationBuildernow accepts a$strategyparameter;tenant_idcolumn is only emitted for thesharedstrategy.GenerateCommandandGenerateAllCommandreadtenancy.strategyfromconfig/application.yamland pass it through - Tenant-scoped unique indexes — Unique indexes in
sharedstrategy automatically prependtenant_idas the first column, preventing cross-tenant unique constraint violations - FK columns —
belongsTorelations now emitINT NOT NULLFK columns (previously missingNOT NULL) datetimetype — Maps toDATETIMESQL type (previously fell through toTEXT)BaseRepository::create()— Now returns the inserted row withidpopulated vialastInsertId()MigrationRunneroutput — Accepts an injectable?callable $outputin the constructor; defaults toecho. Console commands inject$output->writeln()for Symfony Console formattingTenantService::onboard()— Only callsTenantProvisioner::create()fordatabasestrategy;sharedstrategy registers the tenant row without provisioning a databaseRequest::capture()— Detectsapplication/jsonContent-Type and parsesphp://inputinstead of relying on$_POST. Addedjson()helper method
v2.0.0 — Multi-tenant SaaS framework
Changelog
[v2.0.0] — 2026-06-15
Tenancy
- Shared-table strategy (
tenant_idcolumn, auto-scoped queries) - Database-per-tenant strategy (connection-level isolation)
- Four tenant resolvers:
header,subdomain, JWT (Bearer token),session TenantService: onboard, suspend, resume, offboard lifecycleTenantProvisioner: atomic DB creation with migration rollback on failureRequestLifecycle: safe static state reset for worker-mode PHP
HTTP Layer
- Immutable
Pipelinewith outermost-first middleware execution AuthMiddlewareInterfaceintegration point for auth providersRouterbacked by FastRoute with{param}segments- Immutable
Request/Responsevalue objects; request attributes - Response streaming mode
Code Generation
EntityBuilder:belongsTo→ typed nullable property,hasMany→ typed array propertyMigrationBuilder:FOREIGN KEYconstraints,INDEX/UNIQUE INDEXclauses- Topological sort in
generate:allfor dependency-ordered timestamps make:middlewareandmake:controllerscaffolding commands
Migration System
- Batch-tracked forward/rollback with dry-run mode
migrate:all-tenantswith--parallel Nconcurrent worker processes- Suspended tenants skipped from bulk migrations
Infrastructure
- DI container with reflection-based auto-wiring
- PHPStan at level 8, clean
- CI matrix: PHP 8.3, 8.4, 8.5
- Codecov coverage reporting
.gitattributesfor Packagist dist archive exclusions
What's Changed
- Feature/forge multi tenant by @vedavith in #3
- Implement CLEANUP.md fixes: security, DI, routing, streaming, concurrency, and generator improvements by @vedavith in #4
- Update readme to reflect current implementation by @vedavith in #5
- Feature/forge multi tenant by @vedavith in #6
- Multi-tenant enhancements: JWT resolver, PHPStan, HTTP layer, coverage by @vedavith in #7
- Feature/forge multi tenant by @vedavith in #8
- Multi-tenant SaaS framework: resolvers, scaffolding, auth layer, and polish by @vedavith in #9
- Feature/forge multi tenant by @vedavith in #10
- Merge pull request #10 from vedavith/feature/forge-multi-tenant by @vedavith in #11
- Feature/forge multi tenant by @vedavith in #12
- Docs sync, .gitattributes, and CLI reference updates by @vedavith in #13
New Contributors
Full Changelog: https://github.com/vedavith/Entity-Forge/commits/v2.0.0