PHPackages                             oihana/php-arango - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. oihana/php-arango

ActiveLibrary[HTTP &amp; Networking](/categories/http)

oihana/php-arango
=================

Composable PHP toolkit for ArangoDB. Bundles a modern HTTP client (collections, documents, edges, AQL, cursors, indexes, transactions, graphs, analyzers, views), a high-level façade, document/edge models with trait-based composition, controllers, helpers and CLI commands.

1.4.0(1mo ago)0179↓37%1MPL-2.0PHPPHP &gt;=8.4CI passing

Since Jun 9Pushed 2w agoCompare

[ Source](https://github.com/BcommeBois/oihana-php-arango)[ Packagist](https://packagist.org/packages/oihana/php-arango)[ Docs](https://github.com/BcommeBois/oihana-php-arango)[ RSS](/packages/oihana-php-arango/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (28)Versions (6)Used By (1)

Oihana PHP Arango
=================

[](#oihana-php-arango)

[![Oihana PHP Arango](https://raw.githubusercontent.com/BcommeBois/oihana-php-arango/main/assets/images/oihana-php-arango-logo-inline-512x160.png)](https://raw.githubusercontent.com/BcommeBois/oihana-php-arango/main/assets/images/oihana-php-arango-logo-inline-512x160.png)

Composable PHP toolkit for [ArangoDB](https://www.arangodb.com/). Part of the **Oihana PHP** ecosystem, this package bundles a modern HTTP client, a high-level façade, document/edge models, controllers, helpers and CLI commands — everything you need to build an ArangoDB-backed application end-to-end.

[![Latest Version](https://camo.githubusercontent.com/fc4ad4081c19564f7da2fa279f7cd060e1bbc384aa88c02c75c14b9846dc8bbb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6968616e612f7068702d6172616e676f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/oihana/php-arango)[![Total Downloads](https://camo.githubusercontent.com/464b04cea6413a7570ff5e436c47f7dc2f3d9f4edbc5807b44b7d12d9f5e5b73/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f6968616e612f7068702d6172616e676f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/oihana/php-arango)[![License](https://camo.githubusercontent.com/7f84ef6b86e2af1e53779d02ec0743d5840f7ff522a69d4efb2e165db88f4e02/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6f6968616e612f7068702d6172616e676f2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

📚 Documentation
---------------

[](#-documentation)

📖 **[API documentation](https://bcommebois.github.io/oihana-php-arango)** — the full phpDocumentor API reference (classes, methods, helpers).

User guides (FR + EN) live under [`wiki/`](wiki/) — start there. The API reference can also be generated locally with [phpDocumentor](https://phpdoc.org/) via `composer doc` (output under `./docs`).

A few entry points:

- [Getting started](wiki/en/getting-started/introduction.md) — concepts and dependencies.
- [Search &amp; filtering](wiki/en/db/search-and-filtering.md) — the `?search=` / `?filter=` / `?facets=` query DSL.
- [Testing](wiki/en/testing.md) — unit tests, code coverage and the live smoke tests.
- [Contributing](CONTRIBUTING.md) — setup, conventions and the PR workflow.

📦 Installation
--------------

[](#-installation)

Requires [PHP 8.4+](https://php.net/releases/) and an [ArangoDB 3.11+](https://www.arangodb.com/) server. Install via [Composer](https://getcomposer.org/):

```
composer require oihana/php-arango
```

✨ What you can do
-----------------

[](#-what-you-can-do)

- **Talk to ArangoDB** through a modern, ready-to-use HTTP client built on Guzzle — Basic + JWT/Bearer authentication, automatic 401 refresh, cluster failover, retry on transient errors.
- **Run AQL queries** with safe placeholder binding (`aql()` helper), an `AqlBuilder` for fluent assembly, and a lazy `Cursor` supporting `map / forEach / reduce / flatMap`.
- **Manage collections, documents, edges and indexes** — full CRUD, batch operations, bulk JSON-Lines import, 7 typed index types (`PersistentIndex`, `GeoIndex`, `TtlIndex`, `FulltextIndex`, `MdiIndex`, `VectorIndex`, `InvertedIndex`).
- **Use transactions, graphs, analyzers and views** — streaming transactions with `withTransaction()` auto-commit/abort, gharial-based graphs with typed vertex/edge collections, ArangoSearch analyzers and views (full-text `SEARCH`, `PHRASE`, `BM25`).
- **Compose document models** via fine-grained traits (CRUD, AQL helpers, signals before/after CRUD).
- **Plug controllers** into any [Slim](https://www.slimframework.com/)-compatible PSR-15 stack with `DocumentsController` + capability gating.
- **Drive list queries from the URL** — a declarative `?search=`, `?filter=` and `?facets=` DSL on document models that compiles to safe, bound AQL: rich comparators, `AND`/`OR`/`NOT`, range (`between`) and array quantifiers (`quant`, `AT LEAST`), hierarchical field paths, edge/join facets, plus output-side `alt` projection transforms.
- **Run live smoke tests** against a real `arangod` via the built-in `arango:test:clients` and `arango:test:facade` console commands.

### Under the hood

[](#under-the-hood)

- A consistent set of value objects and enums — no magic strings.
- Pure-PHP transport based on [GuzzleHttp](https://github.com/guzzle/guzzle) v7.
- Helpers for [PSR-11 Container](https://www.php-fig.org/psr/psr-11/) wiring.
- Hydration delegated to [`oihana/php-reflect`](https://github.com/BcommeBois/oihana-php-reflect) — the client returns array data by default, the high-level façade hydrates into typed objects.
- Casbin RBAC adapter for ArangoDB included (`oihana\arango\casbin\ArangoCasbinAdapter`).

✅ Running tests
---------------

[](#-running-tests)

Run all tests:

```
composer test
```

Run a specific test file:

```
composer test ./tests/oihana/arango/SomeTest.php
```

### Code coverage

[](#code-coverage)

Measure how much of `./src` the suite exercises (requires Xdebug or PCOV):

```
composer coverage       # text + Clover + HTML report under build/coverage/
composer coverage:md    # readable Markdown summary at build/coverage/COVERAGE.md
```

The `build/` output is gitignored — regenerate it on demand rather than committing a snapshot. See [the testing guide](wiki/en/testing.md) for the full workflow.

### Live smoke tests against a real arango database

[](#live-smoke-tests-against-a-real-arango-database)

The package ships with two end-to-end smoke tests that exercise every public surface against a live ArangoDB server. They operate on an ephemeral database that is created and dropped per run, so production data is never touched.

```
# Copy the example config and adjust the [arango] section
cp configs/config.example.toml configs/config.toml

# Run the full smoke suite for the new clients/ HTTP library
./bin/console.php arango:test:clients

# Run the smoke suite for the high-level ArangoDB façade
./bin/console.php arango:test:facade
```

Both commands accept `--step=N`, `--step=N1-N2`, `--step=all`, `--no-cleanup`, `--endpoint=…`, `--user=…`, `--password=…`, `--database=…`.

🛠️ Generate the documentation
-----------------------------

[](#️-generate-the-documentation)

We use [phpDocumentor](https://phpdoc.org/) to generate documentation into the `./docs` folder.

```
composer doc
```

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, coding conventions, the testing workflow and the pull-request process.

🧾 License
---------

[](#-license)

Licensed under the [Mozilla Public License 2.0 (MPL‑2.0)](https://www.mozilla.org/en-US/MPL/2.0/).

👤 About the author
------------------

[](#-about-the-author)

- Author: Marc ALCARAZ (aka eKameleon)
- Email: `marc@ooop.fr`
- Website: `https://www.ooop.fr`

🔗 Related packages
------------------

[](#-related-packages)

PackageDescription[oihana/php-auth](https://github.com/BcommeBois/oihana-php-auth)Casbin RBAC + JWT/OIDC authorization toolkit.[oihana/php-commands](https://github.com/BcommeBois/oihana-php-commands)Symfony Console kernel and reusable command traits.[oihana/php-core](https://github.com/BcommeBois/oihana-php-core)Core helpers and utilities shared across the ecosystem.[oihana/php-enums](https://github.com/BcommeBois/oihana-php-enums)Typed constants and enums — no more magic strings.[oihana/php-exceptions](https://github.com/BcommeBois/oihana-php-exceptions)Framework exceptions with consistent semantics.[oihana/php-files](https://github.com/BcommeBois/oihana-php-files)File system helpers (paths, readers, writers).[oihana/php-reflect](https://github.com/BcommeBois/oihana-php-reflect)Reflection and object hydration utilities.[oihana/php-schema](https://github.com/BcommeBois/oihana-php-schema)Schema.org constants and vocabulary.[oihana/php-signals](https://github.com/BcommeBois/oihana-php-signals)Signal/slot dispatcher for decoupled events.[oihana/php-system](https://github.com/BcommeBois/oihana-php-system)Framework helpers — controllers, models, request handling.

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance95

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

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

Every ~3 days

Total

5

Last Release

33d ago

### Community

Maintainers

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

---

Top Contributors

[![ekameleon](https://avatars.githubusercontent.com/u/749032?v=4)](https://github.com/ekameleon "ekameleon (411 commits)")

---

Tags

phpclienthttp clientnosqlrbactransactionsdocument-databaseArangoDbcasbinArangograph databaseAQLanalyzersarangosearch

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/oihana-php-arango/health.svg)

```
[![Health](https://phpackages.com/badges/oihana-php-arango/health.svg)](https://phpackages.com/packages/oihana-php-arango)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k16](/packages/tempest-framework)[laravel/framework

The Laravel Framework.

34.8k543.8M20.5k](/packages/laravel-framework)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M754](/packages/sylius-sylius)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)

PHPackages © 2026

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