PHPackages                             marciioluucas/phiber - 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. marciioluucas/phiber

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

marciioluucas/phiber
====================

Simple PHP ORM

71502PHP

Since Jun 15Pushed 8y ago1 watchersCompare

[ Source](https://github.com/marciioluucas/phiber)[ Packagist](https://packagist.org/packages/marciioluucas/phiber)[ RSS](/packages/marciioluucas-phiber/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (2)Used By (0)

[![HitCount](https://camo.githubusercontent.com/d07b8a67965a61b6d21c34bc6139d54fadf0c9b317532f829552ba10639e8891/687474703a2f2f686974732e6477796c2e696f2f6d61726369696f6c75756361732f7068696265722e737667)](http://hits.dwyl.io/marciioluucas/phiber)[![Build Status](https://camo.githubusercontent.com/b0176d89d3e17fbaaef65dc3fcc966d86c6f3ff978e834669d866f1445648e4a/68747470733a2f2f7472617669732d63692e6f72672f6d61726369696f6c75756361732f7068696265722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/marciioluucas/phiber)[![Codacy Badge](https://camo.githubusercontent.com/88b8ca57916135abd87acfeeb9a4bd9f739b1215828fa48b4cf7bdb198f32ec5/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6462396634316439623831343464323761623930613033353063623235613238)](https://www.codacy.com/app/marciioluucas/phiber?utm_source=github.com&utm_medium=referral&utm_content=marciioluucas/phiber&utm_campaign=Badge_Grade)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/53d60735fce5f516cb4e2a69774d0e7c3f5e470e86692fb66cc2d9dfcfbb44c6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d61726369696f6c75756361732f7068696265722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/marciioluucas/phiber/?branch=master)[![GitHub issues](https://camo.githubusercontent.com/9135f894be48688bedb081be4b668ada0a67e3c2c44bac91d49eb0a9a3e0922f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6d61726369696f6c75756361732f7068696265722e737667)](https://github.com/marciioluucas/phiber/issues)[![GitHub forks](https://camo.githubusercontent.com/1fce12f917ea09eca1813714484341b7c7cd2838f3ef861f3495c43b081c0a4a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6d61726369696f6c75756361732f7068696265722e737667)](https://github.com/marciioluucas/phiber/network)[![GitHub stars](https://camo.githubusercontent.com/1d16729f0b25d8f6d26a7650fdfffa83876f5bcc2a89293a0d5ff16d6bbb830e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6d61726369696f6c75756361732f7068696265722e737667)](https://github.com/marciioluucas/phiber/stargazers)[![GitHub license](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://raw.githubusercontent.com/marciioluucas/phiber/master/license)[![Twitter](https://camo.githubusercontent.com/91a464ec393ce387ecc787468181447ffb78a09e16774a9005a2b0bc848191ee/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c2f68747470732f6769746875622e636f6d2f6d61726369696f6c75756361732f7068696265722e7376673f7374796c653d736f6369616c)](https://twitter.com/intent/tweet?text=Wow:&url=%5Bobject%20Object%5D)

Phiber - ALPHA version 1.2
==========================

[](#phiber---alpha-version-12)

[![Imgur](https://camo.githubusercontent.com/9559e16c2176c36228834052bb6e7caa0480f9fb4956040fece18a0a5fd0d649/687474703a2f2f692e696d6775722e636f6d2f416430324e53322e706e67)](https://marciioluucas.github.io/phiber)

Phiber is a simple ORM framework that helps you code your applications faster.

- MySQL integration
- Object Orientation
- Without SQL

New Features!
=============

[](#new-features)

- Persistence
- Build websites, apps and api without a single SQL query line.
- Choose if you wanna make your SQL manually or by Object Mapping.

You can also:

- See generated SQL
- Activate console logs.

This library has been made by a Internet Systems Tecnology's student from Morrinhos - GO, Brazil.

[![IFGoiano](https://camo.githubusercontent.com/7cdf82ce88ce545b1f8404e63b4e81eabdde4ecd3b9f219679a2671a3a68beed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f49462d476f69616e6f2d627269676874677265656e2e737667)](https://www.ifgoiano.edu.br/morrinhos)

Creator \[Márcio Lucas\]

> I made this library to increase my knowledge and to help my programmer friends build apps in PHP faster, because I see big difficulty to build SQLs and i think it is very boring.

This library are in alpha test, I don't recommend to production environments.

### Technology

[](#technology)

Phiber uses just pure PHP and until now only has been builded the part to MySQL 5.5+. \*In the next versions we will implement in BDs like PostgreSQL and Oracle.

### Dependencies

[](#dependencies)

Phiber have only depdencies with Composer.

### Installation

[](#installation)

Phiber requires PHP 5.3.3+ to run and MySQL 5.5+.

Installing Phiber in your project.

The Phiber instalation is made by Composer, using the console code below:

```
$ composer require marciioluucas/phiber
```

### Config

[](#config)

To configure Phiber is very simple, you have to create an archive called phiber\_config.json in your project root path same like this.

$ROOT\_PROJECT\_PATH/phiber\_config.json

```
{
  "phiber": {
    "language": "pt_br",
    "link": {
      "database_technology": "mysql",
      "database_name": "phiber_test",
      "url": "mysql:host=localhost;dbname=teste_phiber",
      "user": "root",
      "password": "",
      "connection_cache": true
    },
    "log": true,
    "execute_queries": true
  }
}
```

### Examples

[](#examples)

```
InnerJoin example:
$phiber = new Phiber();

$phiber->setTable("user");
$phiber->setFields(["user.id","user.name","user.email"]);
$phiber->add($phiber->restrictions->join("user_address", ["pk_user", "fk_user"]));
$phiber->add($phiber->restrictions->and($phiber->restrictions->equals("user.id","1"), $phiber->restrictions->like("user.name","Marcio") ));
$phiber->add($phiber->restrictions->limit(15));
$phiber->add($phiber->restrictions->offset(5));
$phiber->add($phiber->restrictions->orderBy(['user.id ASC']));
$phiber->select(); // Execute query
echo $phiber->show(); // After execute, prints the generated query
Generate->
SELECT user.id, user.name, user.email FROM user INNER JOIN user_address ON pk_user = fk_user  WHERE (user.id = :condition_user.id AND user.name LIKE CONCAT('%',:condition_user.name,'%')) ORDER BY user.id ASC LIMIT 15  OFFSET 5;
```

### TODOS:

[](#todos)

- In the create method, make the support for the composition and others.
- Split classes correctly
- Do Relationables tables

License
-------

[](#license)

MIT

**Free Software, Hell Yeah!**

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.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://avatars.githubusercontent.com/u/10940740?v=4)[Márcio Lucas R. Oliveira](/maintainers/marciioluucas)[@marciioluucas](https://github.com/marciioluucas)

---

Top Contributors

[![marciioluucas](https://avatars.githubusercontent.com/u/10940740?v=4)](https://github.com/marciioluucas "marciioluucas (209 commits)")[![Diego-Brocanelli](https://avatars.githubusercontent.com/u/4108889?v=4)](https://github.com/Diego-Brocanelli "Diego-Brocanelli (24 commits)")

---

Tags

mysqlormphiberphp-frameworkphp-orm

### Embed Badge

![Health badge](/badges/marciioluucas-phiber/health.svg)

```
[![Health](https://phpackages.com/badges/marciioluucas-phiber/health.svg)](https://phpackages.com/packages/marciioluucas-phiber)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8441.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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