Hector ORM

website·Indexed 31 days ago

https://gethectororm.com/

A modern, modular, and lightweight PHP ORM designed to be framework-agnostic with decoupled components that can be used independently.

Tokens
326
Snippets
2
Records
3
Agent score
5%

What's inside Hector ORM

  1. Overview of Hector ORM

    Hector ORM is a modern, modular, and lightweight PHP ORM (MIT license) designed to be framework-agnostic. It is compatible with PHP 8.0 to 8.5+ and supports MySQL 5.7–9.5+, MariaDB 10.5–12.1+, and SQLite 3.x+. Key architectural features include zero-config entity mapping via schema introspection, native PHP 8 attribute configuration, and built-in support for read/write separation (master/replica setups). It adheres to PSR-4, PSR-7, PSR-14, and PSR-16 standards.
  2. Install Hector ORM via Composer

    Install the core Hector ORM package using Composer to get started with the library.
    composer require hectororm/hectororm
  3. Hector ORM modular package components

    Hector ORM is decoupled into standalone packages that can be used independently or together:
    - hectororm/collection: Typed eager and lazy collections with functional API
    - hectororm/connection: PDO wrapper with read/write DSN, driver introspection, and query logging
    - hectororm/data-types: Bidirectional type casting (DateTime, Enum, JSON, UUID, etc.)
    - hectororm/query: Fluent query builder with sorting and pagination support
    - hectororm/schema: Runtime schema introspection (tables, columns, indexes, foreign keys)
    - hectororm/pagination: Offset, cursor, and range pagination with URI builders
    - hectororm/orm: Core ORM including entities, relationships, mapper, events, and storage