v3.0.0
This completes the v3 ORM/runtime refactor and closes the remaining release-blocking cleanup around model configuration and backend support.
What Changed
- split the old MySQL-centric database layer into backend-aware runtime pieces:
ConnectionsStorageType- concrete
MySQLandSQLitedrivers - backend-specific query renderers
- backend-specific schema writers
- introduced first-class SQLite support across config, runtime, query rendering, schema generation, and test execution
- extracted model read/hydration concerns into:
FactoryModelMetadataInstantiatorEventBinderPrototypeRegistry
- extracted lifecycle behavior from
ActiveRecordinto handler classes for save/delete/destroy/before-save/after-save/cache clearing/exception handling - reduced per-model boilerplate by making these optional for ordinary models:
$rootClass$defaultClass$subClasses$singularNoun$pluralNoun
- kept explicit metadata support for real polymorphic roots and synthetic test models that intentionally need separate model identities
- added v3 architecture documentation in
docs/v3-architecture.md - linked the new architecture doc from the README and added a minimal model example near the top
- fixed config override loading so
config/db.dev.phpis resolved relative toconfig/db.php
Why
The old architecture concentrated too much behavior in ActiveRecord and a single MySQL-oriented DB helper. This PR moves the framework toward explicit layers for:
- backend resolution
- query dialect selection
- schema generation
- model metadata
- hydration
- lifecycle orchestration
That makes the runtime easier to extend, gives SQLite real support instead of partial compatibility, and removes repetitive boilerplate from normal models.
Compatibility Notes
- normal models no longer need to declare subclass metadata or noun labels unless they are intentionally overriding defaults
- polymorphic roots like
Mediashould still declare explicit subclass metadata - special test doubles or synthetic models that need their own root identity should also keep explicit metadata
Verification
composer testpasses- MySQL:
OK (221 tests, 539 assertions) - SQLite:
OK (221 tests, 545 assertions)