PHPackages                             tlg05/cakephp-neo4j - 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. tlg05/cakephp-neo4j

ActiveCakephp-plugin[Database &amp; ORM](/categories/database)

tlg05/cakephp-neo4j
===================

Neo4j Datasource for CakePHP

26PHP

Since Dec 20Pushed 8y ago2 watchersCompare

[ Source](https://github.com/tlg05/cakephp-neo4j)[ Packagist](https://packagist.org/packages/tlg05/cakephp-neo4j)[ RSS](/packages/tlg05-cakephp-neo4j/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Neo4j datasource for CakePHP 2.x
================================

[](#neo4j-datasource-for-cakephp-2x)

Requirements
------------

[](#requirements)

- PHP5
- CakePHP &gt;= 2.2.5

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

[](#installation)

- This datasource send neo4j request through restful API. So no php driver for Neo4j is required.
- This project is a standard CakePHP plugin and it can be installed just like other plugins.

Place the repository under the Plugin folder

```
cd my/app/Plugin
git clone git://github.com/tlg05/cakephp-neo4j.git Neo4j

```

Load the plugin in bootstrap.php

```
CakePlugin::load("Neo4j");

```

Provider database server information in database.php:

```
class DATABASE_CONFIG {
    public $neo4j = array(
        'datasource' => 'Neo4j.Neo4jSource',
        'host' => 'localhost',
        'port' => 34618,
        'login' => 'neo4j',
        'password' => 'password'
    );

    public $test_neo4j = array(
        'datasource' => 'Neo4j.Neo4jSource',
        'host' => 'localhost',
        'port' => 33110,
        'login' => 'neo4j',
        'password' => 'password'
    );
}

```

> **Note**
>
> - Please make sure the model files use schemaless behavior.
> - There is model Node and Relationship to be extended. These 2 kinds of models are differentiated by the property $modelType

How it works
------------

[](#how-it-works)

**The test cases contain thorough examples of the usages.**

Nodes can be managed like normal CakePHP data:

```
$data = array(
    'title' => 'test1',
    'body' => 'aaaa',
    'text' => 'bbbb'
);
$this->Post->create();
$this->Post->save($data);
$data = $this->Post->find('all');

```

Relationships are special. We need to provide start node, end node and the properties for a relationship. **The properties of the relationship needs to be placed under properties tag instead of the root level of the data**:

```
$data = array(
    'start' => 'Post',
    'end' => 'Writer',
    'conditions' => array(
        'start.title' => 'The Old Man and the Sea',
        'end.name' => 'Hemingway'
    ),
    'properties' => array(
        'note' => ‘Hemingway writes The Old Man and the Sea'
    )
);
$this->Write->create();
$this->Write->save($data3, array("atomic" => false));

```

 **Data association is not supported yet.**

Author
------

[](#author)

Ligeng Te

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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/8463a2d07fc954104db48031be3948dbfe4163a9a8a42fb94927f1aa42f5bba4?d=identicon)[tlg05](/maintainers/tlg05)

---

Top Contributors

[![ligeng-vsee](https://avatars.githubusercontent.com/u/240066694?v=4)](https://github.com/ligeng-vsee "ligeng-vsee (5 commits)")[![tlg05](https://avatars.githubusercontent.com/u/6892434?v=4)](https://github.com/tlg05 "tlg05 (1 commits)")

### Embed Badge

![Health badge](/badges/tlg05-cakephp-neo4j/health.svg)

```
[![Health](https://phpackages.com/badges/tlg05-cakephp-neo4j/health.svg)](https://phpackages.com/packages/tlg05-cakephp-neo4j)
```

###  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.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/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)
