Pairity/MILESTONES.md
Funky Waddle 1984fbe729
Some checks failed
CI / test (8.2) (push) Has been cancelled
CI / test (8.3) (push) Has been cancelled
CI / test (8.4) (push) Has been cancelled
Completely revamped Pairity ORM
2026-02-07 23:26:07 -06:00

5.5 KiB

Milestones

Table of Contents

  • Milestone 1: Planning & Specification
  • Milestone 2: CLI Infrastructure & Service Container
  • Milestone 3: Error Handling & Localization
  • Milestone 4: Connection Management & Drivers
  • Milestone 5: Advanced Database Features
  • Milestone 6: YAML Schema & Fluent Builder
  • Milestone 7: Metadata Management & Caching
  • Milestone 8: DTO/DAO Code Generation
  • Milestone 9: Performance & State Management
  • Milestone 10: Basic Query Builder & CRUD
  • Milestone 11: Relationships & Eager Loading
  • Milestone 12: Unit of Work & Concurrency
  • Milestone 13: Lifecycle Events & Auditing
  • Milestone 14: Enterprise Features & Tooling
  • Milestone 15: Project Clean Up

Milestone 1: Planning & Specification

  • Define Core Concepts and Architecture in SPECS.md
  • Establish CLI Tool as a first-class citizen
  • Minimal composer.json setup
  • Project cleanup and reset to PLANNING status

Milestone 2: CLI Infrastructure & Service Container

  • Implement basic CLI structure (bin/pairity)
  • Define internal command registration system
  • Implement Service Container / Dependency Injection base
  • Verify binary exposure via Composer (bin entry in composer.json)

Milestone 3: Error Handling & Localization

  • Implement Exception Hierarchy
  • Implement i18n Translation Layer for CLI and Exceptions

Milestone 4: Connection Management & Drivers

  • Implement DatabaseManager
  • Implement Driver abstractions (MySQL, Postgres, SQLite, etc.)
  • Support for multiple named connections
  • Implement Connection Heartbeat and Health Check logic

Milestone 5: Advanced Database Features

  • Implement Read/Write splitting logic
  • Implement Manual Transaction and Savepoint support
  • Implement Database Interceptors (Middleware)

Milestone 6: YAML Schema & Fluent Builder

  • Define YAML Schema format for table definitions (including Tenancy, Prefix, Inheritance, and Morph)
  • Implement Fluent Schema Builder API
  • Implement YAML parser and validator (supporting Enum casting, attribute visibility, Custom Types, and Encrypted Attributes)
  • Implement JSON Schema for YAML autocompletion (Opportunity Radar)
  • Implement Schema Linting CLI command (Opportunity Radar)
  • Implement Type Mapping Registry (Opportunity Radar)

Milestone 7: Metadata Management & Caching

  • Implement Metadata Cache (PSR-16 integration)
  • Support for Database View mapping
  • Implement Schema Snapshotting (make:yaml:snapshot) and Blueprint exporting

Milestone 8: DTO/DAO Code Generation

  • Implement Code Generator for DTOs (supporting serialization, visibility, Virtual Properties, Inheritance, and Encrypted Attributes)
  • Implement Code Generator for DAOs
  • Implement basic CRUD and Mass Operations (Insert, Update, Delete) in DAOs

Milestone 9: Performance & State Management

  • Implement Pre-Generated Hydrators for performance
  • Implement Identity Map pattern for DTO tracking
  • Implement Lazy Loading via Ghost Objects (Proxies)

Milestone 10: Basic Query Builder & CRUD

  • Implement fluent Query Builder
  • Implement Subquery support in FROM and WHERE IN (Advanced Features)
  • Implement Advanced Subquery Features (Joins, Existence Checks, Selects)
  • Implement Query Result Normalization (Consistent object syntax for raw results)
  • Implement Raw SQL Expressions support
  • Implement Driver-Specific Hints and Options
  • Implement Query Logging and Profiling
  • Implement Standardized Paginator (Offset and Cursor)
  • Safety Check: Prevent unconstrained Mass Update/Delete via configuration

Milestone 11: Relationships & Eager Loading

  • Implement Nested, Constrained, and Polymorphic Eager Loading
  • Support for Polymorphic relations in DAOs

Milestone 12: Unit of Work & Concurrency

  • Implement Unit of Work for transactional tracking
  • Implement Optimistic Locking (versioning)
  • Support for Pessimistic Locking (sharedLock, lockForUpdate)
  • Implement Upsert logic

Milestone 13: Lifecycle Events & Auditing

  • Implement Event Dispatcher and lifecycle hooks
  • Implement Auditing System

Milestone 14: Enterprise Features & Tooling

  • Implement Automatic Multi-Tenancy scoping
  • Implement Data Seeding system
  • Implement Procedural Data Migration System (migration:data)
  • Implement Model Factories
  • Implement Seed Squashing (db:seed:squash)
  • Implement manual migration support
  • Implement Schema Introspection (make:yaml:fromdb)
  • Implement Database Health Check commands (db:check:health, db:check:sync)
  • Implement Query Result Caching
  • Implement Async/Parallel Query Execution logic
  • Implement Set Operations (Unions, Intersect, Except)

Milestone 15: Project Clean Up

  • Update all thrown exceptions in codebase to use the i18n localization for exception messages
  • Exception Context Standardization: Ensure all exceptions leverage the context array in PairityException to pass structured data
  • Dead Code Elimination: Identify and remove any unused traits or helper methods
  • Create Translation files for Spanish (es.php), French (fr.php), German (de.php), and Italian (it.php)
  • Implement Task Priority rule [R21] and Definition of Done guidelines
  • Update README to be a normal project type README. Make sure all necessary Features, Installation examples, Usage examples (both DAO/DTO and Query Builder), and anything else typically found in a project README are present.