laravel-freelancer-nl / arangodb-php-client
Low level PHP client for ArangoDB
Package info
github.com/LaravelFreelancerNL/arangodb-php-client
pkg:composer/laravel-freelancer-nl/arangodb-php-client
Fund package maintenance!
Requires
- php: ^8.1
- ext-curl: *
- ext-json: *
- guzzlehttp/guzzle: ^7.3
- halaxa/json-machine: ^1.0
- spatie/data-transfer-object: ^3.9
- spatie/ray: ^1.41
Requires (Dev)
- laravel/pint: ^1.2.1
- mockery/mockery: ^1.4
- pestphp/pest: ^2.2
- phpmd/phpmd: ^2.9
- phpstan/phpstan: ^1.0
- rector/rector: ^0.14.8
- scrutinizer/ocular: ^1.8
- dev-next
- v2.8.0
- v2.7.0
- v2.6.0
- v2.5.0
- v2.4.1
- v2.4.0
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.1
- 2.0.0
- 1.x-dev
- 1.1.0
- v1.0.0
- 1.0.0-alpha.1
- 1.0.0-alpha
- dev-dependabot/github_actions/dependabot/fetch-metadata-2.5.0
- dev-dependabot/github_actions/actions/cache-5
- dev-dependabot/github_actions/actions/checkout-6
- dev-dependabot/github_actions/stefanzweifel/git-auto-commit-action-7
This package is auto-updated.
Last update: 2026-03-31 06:54:36 UTC
README
Low level PHP client for ArangoDB. Supports PHP ^8.0.
I’m archiving my ArangoDB PHP/Laravel packages
Due to the license changes ArangoDB introduced last year, it no longer makes sense for me to continue using the product or to invest further time in developing, maintaining, and improving these packages.
While building and running side projects is in many ways easier and more affordable than ever, the new license creates a significant barrier for my own projects.
I’ve genuinely enjoyed working with ArangoDB, and I still believe it is an excellent product. However, under the current licensing model, I can no longer justify the time required to support these packages. Time is my most limited resource, and I need to allocate it where it makes sense professionally.
As a result, I am archiving the following packages:
- The Laravel driver: https://github.com/LaravelFreelancerNL/laravel-arangodb
- The PHP client: https://github.com/LaravelFreelancerNL/arangodb-php-client
- The AQL query builder: https://github.com/LaravelFreelancerNL/fluentaql
If there is interest in continuing their development, you are welcome to fork them and maintain your own versions. Alternatively, if you would like to sponsor or hire me to continue maintaining them, please feel free to get in touch.
Thank you to everyone who has used, supported, or contributed to these packages.
So long, and thanks for all the fish.
Bas
Laravel Freelancer NL
This client is a conduit to ArangoDB and back, so it doesn't make any presumptions on the returned data itself. JSON objects are decoded to POPO's. You can cast those to what you need in your ODM or project.
Install
composer require laravel-freelancer-nl/arangodb-php-client
Quickstart
Create a new client
$client = new ArangoClient($config);
Create a collection
Use the schemaManager to create a new collection.
$client->schema()->createCollection('users');
Get documents from the collection
$statement = $client->prepare('FOR user in Users RETURN user');
$statement->execute();
$users = $statement->fetchAll();
As there are no users yet in the above example this will yield an empty result. Note that this client does not have any preconceptions about the data structure and thus everything is returned as raw arrays.
config
The connector has a default configuration for a local ArangoDB instance at it's default port (8529).
AQL statements
To run AQL queries you prepare a query, execute it and fetch the results. Much like PHP's PDO extension.
$statement = $client->prepare('FOR user in users RETURN user');
$statement->execute();
$users = $statement->fetchAll();
Alternatively you can traverse over the statement itself to get the results one at a time.
$statement = $client->prepare('FOR user in users RETURN user');
$statement->execute();
foreach ($statement as $document) {
//
}
Managers
You have access to several managers that allow you to perform specific tasks on your ArangoDB instance(s). Their functions can be called on the manager.
Admin manager
The admin manager manages administrative functions and information retrieval for the server/cluster.
$client->admin()->version();
Monitor manager
The monitor manager manages monitoring functions the server/cluster.
$client->monitor()->getMetrics();
Schema manager
The schema manager manages all schema related operations.
$client->schema()->createDatabase('new_db');
Transaction manager
The transaction manager takes care of all transactions.
$client->transactions()->begin(['write' => ['users', 'teams']]);
Documentation
- ArangoDB PHP client
- AQL query statements
- Admin manager
- Monitor manager
- Schema manager
- Transaction manager