PHPackages                             comhon-project/comhon - 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. [Framework](/categories/framework)
4. /
5. comhon-project/comhon

ActiveLibrary[Framework](/categories/framework)

comhon-project/comhon
=====================

The Comhon! PHP framework

v5.0.0(5y ago)237MITPHPPHP ^7.2CI failing

Since Aug 3Pushed 5y ago1 watchersCompare

[ Source](https://github.com/comhon-project/comhon)[ Packagist](https://packagist.org/packages/comhon-project/comhon)[ Docs](https://github.com/comhon-project/comhon)[ RSS](/packages/comhon-project-comhon/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (7)Used By (0)

Comhon!
=======

[](#comhon)

Synopsis
--------

[](#synopsis)

[Comhon!](https://github.com/comhon-project/comhon/wiki) (Common Object Manager, Hashmap Or Nothing!) is an object manager based on gess what ?... hashmap!

It will allow you to import, export, serialize (in sql database, xml file, json file) objects without any line of code. You don't have to create any classes (actually you can if you're not comfortable without them), you just have to describe your model in a manifest (xml file or json file). For exemple a manifest may be linked to an sql table and you will be able to Select/Insert/Update without write your sql query (actually like an ORM)

Some others features
--------------------

[](#some-others-features)

- advanced object managment ([see wiki page](https://github.com/comhon-project/comhon/wiki/Object-management))
- provide a request format to request any object by any client ([see wiki page](https://github.com/comhon-project/comhon/wiki/requester))
- provide automatic and dynamic REST API ([see wiki page](https://github.com/comhon-project/comhon/wiki/rest-api))

Manifest Example
----------------

[](#manifest-example)

A Manifest permit to describe a concept by listing its properties. Manifests can be defined in XML or JSON format

simple XML manifest to describe a person :

```

```

simple JSON manifest to describe a person :

```
{
    "version": "3.0",
    "name": "Example\\Person",
    "properties": [
        {
            "name": "identifier",
            "is_id": true,
            "__inheritance__": "Comhon\\Manifest\\Property\\String"
        },
        {
            "name": "firstName",
            "__inheritance__": "Comhon\\Manifest\\Property\\String"
        },
        {
            "name": "lastName",
            "__inheritance__": "Comhon\\Manifest\\Property\\String"
        },
        {
            "name": "age",
            "__inheritance__": "Comhon\\Manifest\\Property\\Integer"
        }
    ]
}
```

for more informations to build complexes manifests take a look at [manifest wiki page](https://github.com/comhon-project/comhon/wiki/Manifest)

Code Example
------------

[](#code-example)

```
// first way to instanciate a comhon object
$personModel = InstanceModel::getInstance()->getInstanceModel('Example\Person');
$person = $personModel->getObjectInstance();

// second way to instanciate a comhon object
$person = new ComhonObject('Example\Person');

// third way to instanciate a comhon object only if you have defined a class
$person = new Person();

// set comhon object values
$person->setValue('age', 21);
$person->setValue('foo', 'bar'); // will not work because person doesn't have property 'foo'

// get a comhon object value
$age = $person->getValue('age');

// instanciate a comhon object by importing json
$interfacer = new StdObjectInterfacer();
$person = $interfacer->import(json_decode('{"first_name":"john","last_name":"john","age":21}'), $personModel);

// fill an existing comhon object by importing json
$interfacer = new StdObjectInterfacer();
$person->fill(json_decode('{"first_name":"john","last_name":"john","age":21}'), $interfacer);

// export a comhon object to xml and print it as string
$interfacer = new XMLInterfacer();
$nodeXML = $interfacer->export($person);
echo $interfacer->toString($nodeXML);
// output :

// load, update and save an object (from/to sql database or xml file or json file)
$loadedPerson = $personModel->loadObject('id_of_a_person');
$loadedPerson->setValue('age', 25);
$loadedPerson->save();
```

Motivation
----------

[](#motivation)

give a chance to make a comhon object managment in your project and avoid many specifics cases in your code source that make your project unmaintainable and hard to improve

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

[](#installation)

for more informations take a look at [installation wiki page](https://github.com/comhon-project/comhon/wiki/Installation)

Documentation
-------------

[](#documentation)

for more informations take a look at [wiki page](https://github.com/comhon-project/comhon/wiki)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Every ~405 days

Total

4

Last Release

1994d ago

Major Versions

v2.0.0 → v3.0.02019-07-04

v3.0.0 → v4.0.02020-09-28

v4.0.0 → v5.0.02020-12-01

PHP version history (2 changes)v2.0.0PHP ^5.6 || ^7.0

v4.0.0PHP ^7.2

### Community

Maintainers

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

---

Top Contributors

[![comhon-project](https://avatars.githubusercontent.com/u/14244177?v=4)](https://github.com/comhon-project "comhon-project (196 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/comhon-project-comhon/health.svg)

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

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[ccxt/ccxt

A cryptocurrency trading API with more than 100 exchanges in JavaScript / TypeScript / Python / C# / PHP / Go

41.5k328.9k1](/packages/ccxt-ccxt)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M343](/packages/drupal-core-recommended)

PHPackages © 2026

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