Skip to content

v2.0.0 — Multi-tenant SaaS framework

Choose a tag to compare

@vedavith vedavith released this 14 Jun 23:27
· 23 commits to main since this release
103ff27

Changelog

[v2.0.0] — 2026-06-15

Tenancy

  • Shared-table strategy (tenant_id column, auto-scoped queries)
  • Database-per-tenant strategy (connection-level isolation)
  • Four tenant resolvers: header, subdomain, JWT (Bearer token), session
  • TenantService: onboard, suspend, resume, offboard lifecycle
  • TenantProvisioner: atomic DB creation with migration rollback on failure
  • RequestLifecycle: safe static state reset for worker-mode PHP

HTTP Layer

  • Immutable Pipeline with outermost-first middleware execution
  • AuthMiddlewareInterface integration point for auth providers
  • Router backed by FastRoute with {param} segments
  • Immutable Request/Response value objects; request attributes
  • Response streaming mode

Code Generation

  • EntityBuilder: belongsTo → typed nullable property, hasMany → typed array property
  • MigrationBuilder: FOREIGN KEY constraints, INDEX / UNIQUE INDEX clauses
  • Topological sort in generate:all for dependency-ordered timestamps
  • make:middleware and make:controller scaffolding commands

Migration System

  • Batch-tracked forward/rollback with dry-run mode
  • migrate:all-tenants with --parallel N concurrent 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
  • .gitattributes for 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