Download the PHP package dseguy/php-gremlin without Composer
On this page you can find all versions of the php package dseguy/php-gremlin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dseguy/php-gremlin
More information about dseguy/php-gremlin
Files in dseguy/php-gremlin
Package php-gremlin
Short Description PHP client for Apache TinkerPop Gremlin Server 4.0 over its HTTP protocol
License Apache-2.0
Homepage https://github.com/dseguy/php-gremlin
Informations about the package php-gremlin
php-gremlin
A PHP client for Apache TinkerPop Gremlin Server 4.0, talking to its HTTP endpoint directly (TinkerPop 4 dropped the old WebSocket sub-protocol, so there is no session/handshake layer to manage).
- Query & fetch — send Gremlin queries, get back plain PHP values, real
Vertex/Edge/Path/Propertyobjects, or your own hydrated PHP classes. - A fluent Gremlin DSL —
$g->V()->out('knows')->filter(...)->order()->by(...)reads like real Gremlin because it renders to real Gremlin-lang text; the server parses and executes it exactly as it would any other client's query. - Two wire formats — GraphBinary V4 by default (compact, fast), GraphSON V4 as an explicit opt-in for human-readable debugging.
- A mass loader — stream GraphML or GraphSON exports into a running server in batches, without loading the whole file into memory.
Everything here was built and verified against a real Gremlin Server
4.0.0-beta.3, including the entire Apache TinkerPop Gherkin conformance
suite (437 scenarios, run via
Behat — see Testing) — not just unit tests
against assumptions about the protocol.
Requirements
- PHP >= 8.2
ext-curl,ext-json- A Gremlin Server 4.0 instance to connect to
Installation
Quick start
Hydrating into your own classes
Vertex/Edge results can be mapped onto a plain PHP class instead, by property
name (id/label are special-cased):
Serializers
GraphBinary V4 is the default (Gremlin\Driver\Serializer\GraphBinarySerializerV4).
Pass GraphSON explicitly when you want to inspect requests/responses as JSON, e.g.
while debugging against curl:
Both serializers decode into the exact same PHP shapes - switching between them never changes what your code gets back.
Mass loading GraphML / GraphSON
Both readers stream the source file (XMLReader for GraphML, line-by-line for
GraphSON) rather than loading it whole, and BulkLoader batches multiple
vertices/edges into a single request per batch instead of one round trip per
element.
Testing
The integration and Behat suites expect a Gremlin Server 4.0 running locally
(localhost:8182 for tests/Integration, localhost:8184 with three named
toy-graph traversal sources - gmodern/gclassic/gempty - for
vendor/bin/behat; see tests/gremlin-test/bootstrap/FeatureContext.php and
tests/Integration/LiveServerTest.php for the exact configuration expected).
They are not part of CI for that reason - only tests/Unit and PHPStan run
there.
tests/gremlin-test/ vendors a curated subset of Apache TinkerPop's own
language-agnostic Gherkin feature files under their original Apache-2.0 license;
see tests/gremlin-test/VENDORED_FROM.md for provenance and the curation
rationale.
License
Apache-2.0. See LICENSE. Files under tests/gremlin-test/features/
originate from the apache/tinkerpop
project and retain their original license headers.
All versions of php-gremlin with dependencies
ext-curl Version *
ext-json Version *