PHPackages                             astroanu/phpmongograph - 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. astroanu/phpmongograph

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

astroanu/phpmongograph
======================

A graph db wrapper for MongoDB written in PHP

1.0.0(11y ago)233MITPHPPHP &gt;=5.4.0

Since Jul 18Pushed 9y ago1 watchersCompare

[ Source](https://github.com/astroanu/phpmongograph)[ Packagist](https://packagist.org/packages/astroanu/phpmongograph)[ RSS](/packages/astroanu-phpmongograph/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

#### this project is not maintained anymore

[](#this-project-is-not-maintained-anymore)

PHPMongoGraph
=============

[](#phpmongograph)

\####creating graph object

```
$graph = new Graph('mongodb://127.0.0.1', 'dbname');

```

here $graph will return a graph object.

\####creating a node

```
$node = $graph->makeNode();
$node->setProperty('name', 'tom');
$node->save();

```

after a creating a node you can set properties which then later can be retrived by `getProperties()` or `getProperty()` methods. you need to call `save()` to save a node. use `getId()` to get the node id.

\####getting a node

```
$a = $graph->getNode($id);

```

`getNode()` returns a node obeject.

\####making connections

```
$graph->makeConnection()->setStartNode($b)->setEndNode($a)->setType('LIKES')->save();

```

the above means `$b` likes `$a`

\####getting connections $connections = $a-&gt;getConnections(array('LIKES'), Connection::DIRECTION\_IN);

this will return connections sorted reverse chronologically

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

4320d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7db56cb35cd72e4d3ea23805145a758d8039f80ccfd9ece709968c072c463aca?d=identicon)[astroanu](/maintainers/astroanu)

---

Top Contributors

[![astroanu](https://avatars.githubusercontent.com/u/1479064?v=4)](https://github.com/astroanu "astroanu (1 commits)")

---

Tags

phpmongodbGraphDB

### Embed Badge

![Health badge](/badges/astroanu-phpmongograph/health.svg)

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

###  Alternatives

[doctrine/mongodb-odm

PHP Doctrine MongoDB Object Document Mapper (ODM) provides transparent persistence for PHP objects to MongoDB.

1.1k23.3M302](/packages/doctrine-mongodb-odm)

PHPackages © 2026

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