Skip to content
@InitORM

InitORM

QueryBuilder + DBAL + ORM

InitORM

Lightweight, PDO-based PHP database stack — Query Builder, DBAL, Database Manager, and ORM as independent Composer packages.

MIT PHP 8.0+ Packagist downloads


InitORM is an open-source PHP database stack distributed under the MIT license. Each layer is its own Composer package, so you can pull in only the layer you need.

Packages

Package Purpose Composer
QueryBuilder Pure SQL query assembly with parameter binding composer require initorm/query-builder
DBAL PDO connection lifecycle + data mapper composer require initorm/dbal
Database Query Builder + DBAL with CRUD shortcuts and a static facade composer require initorm/database
ORM Models, entities, accessors/mutators, soft deletes composer require initorm/orm

How the layers fit together

QueryBuilder ─┐
              ├─► Database ─► ORM
DBAL ─────────┘

Pick the lowest layer that solves your problem — you do not have to take the full ORM if all you need is a query builder.

Quick start

composer require initorm/orm
use InitORM\ORM\Model;

class User extends Model
{
    protected array $credentials = [
        'dsn'      => 'mysql:host=localhost;dbname=test',
        'username' => 'root',
        'password' => '',
    ];

    protected string $schema   = 'users';
    protected string $schemaId = 'id';
}

Documentation

Each package ships its own GitHub Wiki:

Community

  • Bug reports → open an issue in the affected package repository
  • Questions & ideas → start a Discussion
  • Security disclosures → see SECURITY.md

Contribution guidelines live in CONTRIBUTING.md (also available in Turkish).

initorm-icon

Pinned Loading

  1. Database Database Public

    Fluent CRUD, transactions and query logging for PHP 8.1+ — composes initorm/dbal and initorm/query-builder.

    PHP

  2. ORM ORM Public

    Lightweight PHP ORM with Active Record models and entity accessors/mutators. Soft deletes, timestamps, and permission gates on top of initorm/database.

    PHP

Repositories

Showing 5 of 5 repositories

Top languages

Loading…

Most used topics

Loading…