oihana-php-arango
Composable PHP toolkit for ArangoDB. 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.
π Documentation
This API reference is published at:
https://bcommebois.github.io/oihana-php-arango
User guides are available in two languages:
- π¬π§ English documentation
- π«π· Documentation franΓ§aise
π Project on GitHub
View the full source code and contribute on GitHub:
https://github.com/BcommeBois/oihana-php-arango
π¦ Installation
Requires PHP 8.4+ and an ArangoDB 3.11+ server. Install via Composer:
composer require oihana/php-arango
β¨ 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), anAqlBuilderfor fluent assembly, and a lazyCursorsupportingmap / forEach / reduce / flatMap. - Manage collections, documents, edges and indexes β full CRUD, batch operations, bulk JSON-Lines import, 7 typed index types.
- Use transactions, graphs, analyzers and views β streaming transactions with
withTransaction()auto-commit/abort, gharial-based graphs, ArangoSearch analyzers and views. - Compose document models via fine-grained traits (CRUD, AQL helpers, signals before/after CRUD).
- Plug controllers into any Slim-compatible PSR-15 stack with
DocumentsController+ capability gating. - Drive list queries from the URL β a declarative
?search=,?filter=and?facets=DSL that compiles to safe, bound AQL.
β Running tests
Run all tests:
composer test
Measure code coverage (requires Xdebug or PCOV):
composer coverage # text + Clover + HTML report under build/coverage/ composer coverage:md # readable Markdown summary at build/coverage/COVERAGE.md
ποΈ Changelog
See CHANGELOG.md for notable changes.
π License
This project is licensed under the Mozilla Public License 2.0 (MPL-2.0).
π€ About the author
- Author: Marc ALCARAZ (aka eKameleon)
- Website: www.ooop.fr
- Email: marc@ooop.fr