wikibase-solutions / php-cypher-dsl
A query builder for the Cypher query language written in PHP
Installs: 42 219
Dependents: 3
Suggesters: 0
Security: 0
Stars: 18
Watchers: 6
Forks: 5
pkg:composer/wikibase-solutions/php-cypher-dsl
Requires
- php: >=7.4
 - ext-ctype: *
 - ext-openssl: *
 - symfony/polyfill-php80: ^1.25
 - symfony/polyfill-php81: ^1.25
 
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
 - infection/infection: ^0.25.5
 - phpstan/phpstan: ^1.8
 - phpunit/phpunit: ~9.0
 - rregeer/phpunit-coverage-check: ^0.3.1
 
- dev-main
 - 6.0.0
 - 5.0.0
 - 4.4.1
 - 4.4.0
 - 4.3.0
 - 4.2.0
 - 4.1.0
 - 4.0.0
 - 3.5.0
 - 3.4.1
 - 3.4.0
 - 3.3.1
 - 3.3.0
 - 3.2.0
 - 3.1.0
 - 3.0.1
 - 3.0.0
 - 2.9.0
 - 2.8.0
 - 2.7.0
 - 2.6.0
 - 2.5.0
 - 2.4.0
 - 2.3.0
 - 2.2.3
 - 2.2.2
 - 2.2.1
 - 2.2.0
 - 2.1.0
 - 2.0.3
 - 2.0.2
 - 2.0.1
 - 2.0.0
 - 1.4.0
 - 1.3.0
 - 1.2.0
 - 1.1.0
 - 1.0.0
 - dev-feature/rewrite-cast-trait-to-static
 - dev-feature/use-union-types
 - dev-development
 - dev-support/5.0
 
This package is auto-updated.
Last update: 2025-10-07 19:24:30 UTC
README
The php-cypher-dsl library provides a way to construct advanced Cypher
queries in an object-oriented and type-safe manner.
Documentation
The documentation can be found on the wiki here.
Installation
Requirements
php-cypher-dsl requires PHP 7.4 or greater; using the latest version of PHP
is highly recommended.
Installation through Composer
You can install php-cypher-dsl through composer by running the following
command:
composer require "wikibase-solutions/php-cypher-dsl"
Contributing
Please refer to CONTRIBUTING.md for information on how to contribute to this project.
Example
To construct a query to find all of Tom Hanks' co-actors, you can use the following code:
use function WikibaseSolutions\CypherDSL\node; use function WikibaseSolutions\CypherDSL\query; $tom = node("Person")->withProperties(["name" => "Tom Hanks"]); $coActors = node(); $statement = query() ->match($tom->relationshipTo(Query::node(), "ACTED_IN")->relationshipFrom($coActors, "ACTED_IN")) ->returning($coActors->property("name")) ->build();