Lightweight, PDO-based PHP database stack — Query Builder, DBAL, Database Manager, and ORM as independent Composer packages.
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.
| 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 |
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.
composer require initorm/ormuse 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';
}Each package ships its own GitHub Wiki:
- 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).
