PHPackages                             vitexsoftware/ease-doctrine - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. vitexsoftware/ease-doctrine

ActiveLibrary[Database &amp; ORM](/categories/database)

vitexsoftware/ease-doctrine
===========================

FluentPDO-like API powered by DoctrineORM for easy migration.

113[8 PRs](https://github.com/VitexSoftware/ease-doctrineorm/pulls)PHPCI passing

Since Mar 13Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/VitexSoftware/ease-doctrineorm)[ Packagist](https://packagist.org/packages/vitexsoftware/ease-doctrine)[ RSS](/packages/vitexsoftware-ease-doctrine/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (9)Used By (0)

EaseDoctrine
============

[](#easedoctrine)

A drop-in replacement for FluentPDO, powered by DoctrineORM. This library allows you to migrate existing applications from FluentPDO to DoctrineORM with minimal code changes.

Features
--------

[](#features)

- FluentPDO-like API for easy migration
- Internally uses DoctrineORM for database operations
- Supports multiple database platforms (as supported by DoctrineORM)
- Complete CRUD operations with FluentPDO-compatible methods:
    - getColumnsFromSQL(): Fetch specific columns with conditions
    - getDataFromSQL(): Load records by ID
    - loadFromSQL(): Load data with conditions
    - saveToSQL(): Insert or update records
    - deleteFromSQL(): Remove records
    - recordExists(): Check record existence
- Query builder and transaction support
- Table and column property compatibility (myTable, keyColumn, nameColumn, etc.)
- Compatible with PHP 8.4+
- PSR-12 compliant
- Secure, extensible, and well-tested

Installation
------------

[](#installation)

```
composer require vitexsoftware/ease-doctrineorm
```

Usage Example
-------------

[](#usage-example)

```
use Ease\Doctrine\Engine;

$connectionParams = [
    'driver' => 'pdo_sqlite',
    'path' => __DIR__ . '/var/data.sqlite',
];
$config = [
    'entityPath' => __DIR__ . '/src/Entity',
    'devMode' => true,
];
$easeDoctrine = new Engine($connectionParams, $config);
$easeDoctrine->setmyTable('User');
$easeDoctrine->keyColumn = 'id';
$easeDoctrine->nameColumn = 'username';

// Basic operations
$allUsers = $easeDoctrine->getAll();
$userName = $easeDoctrine->getRecordName();

// FluentPDO-compatible operations
// Load specific columns with conditions
$users = $easeDoctrine->getColumnsFromSQL(
    ['username', 'email'],
    ['active' => true],
    'username',
    null,
    10
);

// Load by ID
$user = $easeDoctrine->getDataFromSQL(123);

// Save (insert or update)
$userData = ['username' => 'john_doe', 'email' => 'john@example.com'];
$userId = $easeDoctrine->saveToSQL($userData);

// Check existence
if ($easeDoctrine->recordExists('john_doe')) {
    echo 'User exists!';
}

// Delete
$easeDoctrine->deleteFromSQL(['id' => 123]);

// Load with conditions
$activeUsers = $easeDoctrine->loadFromSQL(['active' => true]);
```

Detailed API Documentation
--------------------------

[](#detailed-api-documentation)

The library provides several FluentPDO-compatible methods for database operations:

`getColumnsFromSQL(array $columnsList, $conditions = null, $orderBy = null, $indexBy = null, $limit = null)`Fetch specific columns with conditions, ordering, and limits.`getDataFromSQL($itemID, array $columnsList = ['*'])`Load a record by its ID, optionally selecting specific columns.`loadFromSQL($itemID)`Load data for specified conditions or ID.`saveToSQL($data = null)`Save (insert or update) data to the database.`updateToSQL($data = null, $conditions = [])`Update existing records matching conditions.`insertToSQL($data = null)`Insert a new record.`deleteFromSQL($data = null)`Delete records matching conditions.`recordExists($data)`Check if a record exists. Can check by ID, name, or conditions.`dbreload()`Reload current record from database.`dbsync(array $data = [])`Save data and reload from database.Testing
-------

[](#testing)

```
./vendor/bin/phpunit --bootstrap vendor/autoload.php tests
```

License
-------

[](#license)

MIT License

Author
------

[](#author)

Vitex Software &lt;&gt;

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance59

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

Top contributor holds 73.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f24039b55245f141b108d0245b5821fe6cc4bb0585e36283f97301cd3aa792bc?d=identicon)[vitex](/maintainers/vitex)

---

Top Contributors

[![Vitexus](https://avatars.githubusercontent.com/u/2621130?v=4)](https://github.com/Vitexus "Vitexus (28 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (10 commits)")

### Embed Badge

![Health badge](/badges/vitexsoftware-ease-doctrine/health.svg)

```
[![Health](https://phpackages.com/badges/vitexsoftware-ease-doctrine/health.svg)](https://phpackages.com/packages/vitexsoftware-ease-doctrine)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M545](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
