{"id":14959443,"url":"https://github.com/neo4j-php/neo4j-php-client","last_synced_at":"2025-05-15T05:05:36.645Z","repository":{"id":38390306,"uuid":"320226077","full_name":"neo4j-php/neo4j-php-client","owner":"neo4j-php","description":"Php client and driver for neo4j database","archived":false,"fork":false,"pushed_at":"2025-05-14T12:49:44.000Z","size":1845,"stargazers_count":177,"open_issues_count":13,"forks_count":40,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-05-14T12:52:10.511Z","etag":null,"topics":["bolt","connection","database","driver","http","neo4j","php","php-library","session","transaction"],"latest_commit_sha":null,"homepage":"https://neo4j.com/developer/php/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neo4j-php.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-12-10T09:44:01.000Z","updated_at":"2025-05-12T12:46:07.000Z","dependencies_parsed_at":"2023-02-17T22:01:07.350Z","dependency_job_id":"b8efd48d-b9ab-40c5-8d33-3392009f6b87","html_url":"https://github.com/neo4j-php/neo4j-php-client","commit_stats":{"total_commits":1083,"total_committers":24,"mean_commits":45.125,"dds":"0.14773776546629735","last_synced_commit":"03fe278f5cf54a4540f6d200f80c1ec3d1af5562"},"previous_names":[],"tags_count":70,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neo4j-php%2Fneo4j-php-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neo4j-php%2Fneo4j-php-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neo4j-php%2Fneo4j-php-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neo4j-php%2Fneo4j-php-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neo4j-php","download_url":"https://codeload.github.com/neo4j-php/neo4j-php-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254276446,"owners_count":22043866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bolt","connection","database","driver","http","neo4j","php","php-library","session","transaction"],"created_at":"2024-09-24T13:19:44.744Z","updated_at":"2025-05-15T05:05:36.624Z","avatar_url":"https://github.com/neo4j-php.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neo4j PHP Client and Driver\n\n[![GitHub](https://img.shields.io/github/license/neo4j-php/neo4j-php-client)](https://github.com/laudis-technologies/neo4j-php-client/blob/main/LICENSE)\n[![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/laudis-technologies/neo4j-php-client)](https://codeclimate.com/github/laudis-technologies/neo4j-php-client/maintainability)\n[![Packagist PHP Version Support (custom server)](https://img.shields.io/packagist/php-v/laudis/neo4j-php-client)](https://packagist.org/packages/laudis/neo4j-php-client)\n[![Latest Stable Version](https://poser.pugx.org/laudis/neo4j-php-client/v)](https://packagist.org/packages/laudis/neo4j-php-client)\n\n[![Packagist Downloads](https://img.shields.io/packagist/dt/laudis/neo4j-php-client)](https://packagist.org/packages/laudis/neo4j-php-client/stats)\n[![Packagist Downloads](https://img.shields.io/packagist/dm/laudis/neo4j-php-client)](https://packagist.org/packages/laudis/neo4j-php-client/stats)\n\n## Control to worlds' most powerful graph database\n- Pick and choose your drivers with easy configuration\n- Intuitive API\n- Extensible\n- Designed, built and tested under close supervision with the official neo4j driver team\n- Validated with [testkit](https://github.com/neo4j-drivers/testkit)\n- Fully typed with [psalm](https://psalm.dev/)\n- Bolt, HTTP and auto routed drivers available\n\n## See the driver in action\n\n - [An implementation of the class movie database](https://github.com/neo4j-examples/movies-neo4j-php-client). It uses Slim and neo4j-php-client to build an API for the classic movie's example of neo4j.\n - [An complete implementation of the realworld example](https://github.com/neo4j-examples/php-laravel-neo4j-realworld-example). It uses Laravel to implement the [real world example](https://github.com/gothinkster/realworld) project, _the mother of all demo apps_.\n - [The friends api](https://github.com/neo4j-examples/friends-php-client) for the world's most corny example project leveraging the power of Neo4j.\n\nFor some more detailed write-ups you can refer to these blogposts:\n\n - [How to build a JSON RESTful API with Neo4j, PHP and Open API](https://medium.com/neo4j/how-to-build-a-json-restful-api-with-neo4j-php-and-openapi-e45bf0a8956)\n - [Building a Web App with Neo4j, AuraDB and PHP](https://medium.com/neo4j/building-a-web-app-with-neo4j-auradb-and-php-990deca0d213)\n - [Connect to Neo4j with PHP](https://medium.com/neo4j/connect-to-neo4j-with-php-e10e24afedff)\n - [Enterprise level PHP and Neo4j](https://medium.com/neo4j/enterprise-level-php-and-neo4j-e467a789e6b4)\n\nOr watch any of these [videos](https://www.youtube.com/watch?v=qwz5XVtbfSY\u0026list=PL9Hl4pk2FsvViI9wmdDpRS7tZ8V6j4uJs).\n\n## Start your driving experience in three easy steps\n\n### Step 1: install via composer\n\n```bash\ncomposer require laudis/neo4j-php-client\n```\nFind more details [here](#in-depth-requirements)\n\n### Step 2: create a client\n\n```php\nuse Laudis\\Neo4j\\Authentication\\Authenticate;\nuse Laudis\\Neo4j\\ClientBuilder;\n\n$client = ClientBuilder::create()\n    -\u003ewithDriver('bolt', 'bolt+s://user:password@localhost') // creates a bolt driver\n    -\u003ewithDriver('https', 'https://test.com', Authenticate::basic('user', 'password')) // creates an http driver\n    -\u003ewithDriver('neo4j', 'neo4j://neo4j.test.com?database=my-database', Authenticate::oidc('token')) // creates an auto routed driver with an OpenID Connect token\n    -\u003ewithDefaultDriver('bolt')\n    -\u003ebuild();\n```\n\nYou have now created a client with **bolt, HTTPS and neo4j drivers**. The default driver that the client will use is **bolt**.\n\nRead more about the URLs and how to use them to configure drivers [here](#in-depth-configuration).\n\n### Step 3: run a transaction\n\n```php\nuse Laudis\\Neo4j\\Contracts\\TransactionInterface;\n\n$result = $client-\u003ewriteTransaction(static function (TransactionInterface $tsx) {\n    $result = $tsx-\u003erun('MERGE (x {y: \"z\"}:X) return x');\n    return $result-\u003efirst()-\u003eget('x')['y'];\n});\n\necho $result; // echos 'z'\n```\n\n## Decide how to send your Cypher queries\n\nYou can control the driver using three different approaches:\n- *Auto committed queries* (easiest and most intuitive)\n- *Transaction functions* (most portable)\n- *Unmanaged transactions* (for the highest degree of control)\n\n\n### Auto committed queries\n\nAuto committed queries are the most straightforward and most intuitive but have many drawbacks when running complex business logic or within a high availability environment.\n\n#### Run a simple cypher query\n\n```php\n$client-\u003erun(\n    'MERGE (user {email: $email})', //The query is a required parameter\n    ['email' =\u003e 'abc@hotmail.com'],  //Requests can be optionally added\n    'backup' //The default connection can be overridden\n);\n```\n\n#### Run a statement object:\n\n```php\nuse Laudis\\Neo4j\\Databags\\Statement;\n\n$statement = new Statement('MERGE (user {email: $email})', ['email' =\u003e 'abc@hotmail.com']);\n$client-\u003erunStatement($statement, 'default');\n```\n\n#### Running multiple queries at once\n\nThe `runStatements` method will run all the statements at once. This method is an essential tool to reduce the number of database calls, especially when using the HTTP protocol.\n\n```php\nuse Laudis\\Neo4j\\Databags\\Statement;\n\n$results = $client-\u003erunStatements([\n    Statement::create('MATCH (x) RETURN x LIMIT 100'),\n    Statement::create('MERGE (x:Person {email: $email})', ['email' =\u003e 'abc@hotmail.com'])\n]);\n```\n\n### Transaction functions\n\nTransaction functions are the **de facto** standard when using the driver. It is the most portable as it is resistant to a lot of the pitfalls when first developing with high availability solutions such as [Neo4j aura](https://neo4j.com/blog/neo4j-aura-enterprise-ga-release/) or a [cluster](https://neo4j.com/docs/operations-manual/current/clustering/).\n\nThe driver manages transaction functions:\n- It **re-executes** the function in case of a [transient error](https://neo4j.com/docs/status-codes/current/#_classifications).\n- It **commits** the transaction on successful execution\n- It **rolls back** the transaction in case of a timeout.\n- It **routes** the execution to a relevant follower or leader server when the neo4j protocol is enabled.\n\n\u003e ATTENTION: Because of the automatic retry functionality, the function should produce the same result on subsequent recalls, or in more technical terms: should be **idempotent**. Always remember this when designing the execution logic within the function.\n\nSome examples:\n\n```php\nuse Laudis\\Neo4j\\Contracts\\TransactionInterface;\n\n// Do a simple merge and return the result\n$result = $client-\u003ewriteTransaction(static function (TransactionInterface $tsx) {\n    $result = $tsx-\u003erun('MERGE (x {y: \"z\"}:X) return x');\n    return $result-\u003efirst()-\u003eget('x')['y'];\n});\n\n// Will result in an error\n$client-\u003ereadTransaction(static function (TransactionInterface $tsx) {\n    $tsx-\u003erun('MERGE (x {y: \"z\"}:X) return x');\n});\n\n// This is a poorly designed transaction function\n$client-\u003ewriteTransaction(static function (TransactionInterface $tsx) use ($externalCounter) {\n    $externalCounter-\u003eincrementNodesCreated();\n    $tsx-\u003erun('MERGE (x {y: $id}:X) return x', ['id' =\u003e Uuid::v4()]);\n});\n\n// This achieves the same effect but is safe in case it should be retried. The function is now idempotent.\n$id = Uuid::v4();\n$client-\u003ewriteTransaction(static function (TransactionInterface $tsx) use ($id) {\n    $tsx-\u003erun('MERGE (x {y: $id}:X) return x', ['id' =\u003e $id]);\n});\n$externalCounter-\u003eincrementNodesCreated();\n```\n\n### Unmanaged transactions\n\nIf you need lower-level access to the drivers' capabilities, then you want unmanaged transactions. They allow for completely controllable commits and rollbacks.\n\n#### Opening a transaction\n\nThe `beginTransaction` method will start a transaction with the relevant driver.\n\n```php\nuse Laudis\\Neo4j\\Databags\\Statement;\n\n$tsx = $client-\u003ebeginTransaction(\n    // This is an optional set of statements to execute while opening the transaction\n    [Statement::create('MERGE (x:Person({email: $email})', ['email' =\u003e 'abc@hotmail.com'])],\n    'backup' // This is the optional connection alias\n);\n```\n\n\u003e Note that `beginTransaction` only returns the transaction object, not the results of the provided statements.\n\n#### Running statements within a transaction\n\nThe transaction can run statements just like the client object as long as it is still open.\n\n```php\n$result = $tsx-\u003erun('MATCH (x) RETURN x LIMIT 100');\n$result = $tsx-\u003erunStatement(Statement::create('MATCH (x) RETURN x LIMIT 100'));\n$results = $tsx-\u003erunStatements([Statement::create('MATCH (x) RETURN x LIMIT 100')]);\n```\n\n#### Finish a transaction\n\nRollback a transaction:\n\n```php\n$tsx-\u003erollback();\n```\n\nCommit a transaction:\n\n```php\n$tsx-\u003ecommit([Statement::create('MATCH (x) RETURN x LIMIT 100')]);\n```\n\n## Accessing the results\n\nResults are returned in a standard format of rows and columns:\n\n```php\n// Results are a CypherList\n$results = $client-\u003erun('MATCH (node:Node) RETURN node, node.id AS id');\n\n// A row is a CypherMap\nforeach ($results as $result) {\n    // Returns a Node\n    $node = $result-\u003eget('node');\n\n    echo $node-\u003egetProperty('id');\n    echo $result-\u003eget('id');\n}\n```\n\nCypher values and types map to these php types and classes:\n\n| Cypher         | Php                                           |\n|----------------|-----------------------------------------------|\n| null           | * `null`                                      |\n| string         | * `string`                                    |\n| integer        | * `int`                                       |\n| float          | * `float`                                     |\n| boolean        | * `bool`                                      |\n| Map            | * `\\Laudis\\Neo4j\\Types\\CypherMap`             |\n| List           | * `\\Laudis\\Neo4j\\Types\\CypherList`            |\n| Point          | * `\\Laudis\\Neo4j\\Contracts\\PointInterface` ** |\n| Date           | * `\\Laudis\\Neo4j\\Types\\Date`                  |\n| Time           | * `\\Laudis\\Neo4j\\Types\\Time`                  |\n| LocalTime      | * `\\Laudis\\Neo4j\\Types\\LocalTime`             |\n| DateTime       | * `\\Laudis\\Neo4j\\Types\\DateTime`              |\n| DateTimeZoneId | * `\\Laudis\\Neo4j\\Types\\DateTimeZoneId`        |\n| LocalDateTime  | * `\\Laudis\\Neo4j\\Types\\LocalDateTime`         |\n| Duration       | * `\\Laudis\\Neo4j\\Types\\Duration`              |\n| Node           | `\\Laudis\\Neo4j\\Types\\Node`                    |\n| Relationship   | `\\Laudis\\Neo4j\\Types\\Relationship`            |\n| Path           | `\\Laudis\\Neo4j\\Types\\Path`                    |\n\n(*) These items can also be used as parameters in the bolt protocol and will automatically be converted by the driver, so they can be used in Cypher.\n\nBesides these examples, `\\DateTimeInterface` will map to `DateTimeZoneId` in Cypher. An empty or list-type `array` will be converted to a cypher `List`, and an `associative array` will be converted to a `map`.\n\n(**) A point can be one of four types implementing PointInterface: `\\Laudis\\Neo4j\\Types\\CartesianPoint` `\\Laudis\\Neo4j\\Types\\Cartesian3DPoint` `\\Laudis\\Neo4j\\Types\\WGS84Point` `\\Laudis\\Neo4j\\Types\\WGS843DPoint`\n\n## Diving Deeper\n\n### Differentiating between parameter type\n\nCypher has lists and maps. This notion can be problematic as the standard php arrays encapsulate both. When you provide an empty array as a parameter, it will be impossible to determine an empty list or map.\n\nThe `ParameterHelper` class is the ideal companion for this:\n\n```php\nuse Laudis\\Neo4j\\ParameterHelper;\n\n$client-\u003erun('MATCH (x) WHERE x.slug in $listOrMap RETURN x', ['listOrMap' =\u003e ParameterHelper::asList([])]); // will return an empty CypherList\n$client-\u003erun('MATCH (x) WHERE x.slug in $listOrMap RETURN x', ['listOrMap' =\u003e ParameterHelper::asMap([])]); // will error\n$client-\u003erun('MATCH (x) WHERE x.slug in $listOrMap RETURN x', ['listOrMap' =\u003e []]); // will return an empty CypherList\n```\n\n### Version compatibility matrix\n\n| **Driver Version** | **PHP Version** | **Neo4j Version** |\n|--------------------|-----------------|-------------------|\n| ^2.8               | 7.4, ^8.0       | ^3.5, ^4.0        |\n| ^3.0               | ^8.0            | ^4.0, ^5.0        |\n\n### Neo4j Feature Support\n\n| **Feature**          | **Supported?** |\n|----------------------|----------------|\n| Authentication       | Yes            |\n| Transactions         | Yes            |\n| Http Protocol        | Yes            |\n| Bolt Protocol        | Yes            |\n| Cluster              | Yes            |\n| Aura                 | Yes            |\n| Jolt Protocol        | Yes            |\n| Bookmarks            | Yes            |\n\n## In-depth requirements\n\n* PHP \u003e= 7.4\n* A Neo4j database (minimum version 3.5)\n* ext-bcmath *\n* ext-json **\n* ext-sockets ***\n\n(*) Needed to implement the bolt protocol\n\n(**) Needed to implement the http protocol\n\n(***) Can be installed for optimal bolt protocol performance\n\n\nIf you plan on using the HTTP drivers, make sure you have [psr-7](https://www.php-fig.org/psr/psr-7/), [psr-17](https://www.php-fig.org/psr/psr-17/) and [psr-18](https://www.php-fig.org/psr/psr-18/) implementations included into the project. If you don't have any, you can install them via composer:\n\n```bash\ncomposer require nyholm/psr7 nyholm/psr7-server kriswallsmith/buzz\n```\n\n## Result formats/hydration\n\nIn order to make the results of the bolt protocol and the http uniform, the driver provides and summarizes the results.\n\nThe default formatter is the `\\Laudis\\Neo4j\\Formatters\\SummarizedResultFormatter`, which is explained extensively in [the result format section](#accessing-the-results).\n\n`\\Laudis\\Neo4j\\Formatter\\SummarizedResultFormatter` adds an extensive result summary.\n\nThe client builder provides an easy way to change the formatter:\n\n```php\n$client = \\Laudis\\Neo4j\\ClientBuilder::create()-\u003ebuild();\n\n/**\n * The client will now return a result, decorated with a summary.\n *\n * @var \\Laudis\\Neo4j\\Databags\\SummarizedResult $results\n */\n$summarisedResult = $client-\u003erun('MATCH (x) RETURN x');\n\n// The summary contains extensive information such as counters for changed values in the database,\n// information on the database, potential notifications, timing, a (profiled) plan, the type of query\n// and information on the server itself.\n$summary = $summarisedResult-\u003egetSummary();\n// The result is exactly the same as the default.\n$result = $summarisedResult-\u003egetResult();\n```\n\n## Concepts\n\nThe driver API described [here](https://neo4j.com/docs/driver-manual/current/) is the main target of the driver. Because of this, the client is nothing more than a driver manager. The driver creates sessions. A session runs queries through a transaction.\n\nBecause of this behaviour, you can access each concept starting from the client like this:\n\n```php\nuse Laudis\\Neo4j\\ClientBuilder;\n\n// A builder is responsible for configuring the client on a high level.\n$builder = ClientBuilder::create();\n// A client manages the drivers as configured by the builder.\n$client = $builder-\u003ebuild();\n// A driver manages connections and sessions.\n$driver = $client-\u003egetDriver('default');\n// A session manages transactions.\n$session = $driver-\u003ecreateSession();\n// A transaction is the atomic unit of the driver where are the cypher queries are chained.\n$transaction = $session-\u003ebeginTransaction();\n// A transaction runs the actual queries\n$transaction-\u003erun('MATCH (x) RETURN count(x)');\n```\n\nIf you need complete control, you can control each object with custom configuration objects.\n\n### Client\n\nA **client** manages **drivers** and routes the queries to the correct drivers based on preconfigured **aliases**.\n\n### Driver\n\nThe **driver** object is the thread-safe backbone that gives access to Neo4j. It owns a connection pool and can spawn **sessions** for carrying out work.\n\n```php\nuse Laudis\\Neo4j\\Basic\\Driver;\nuse Laudis\\Neo4j\\Databags\\DriverConfiguration;\n\n$driver = Driver::create(\n    uri: 'neo4j://user:mypassword@Localhost:7687',\n    configuration: DriverConfiguration::create()-\u003ewithUserAgent('MyApp/1.0.0')\n);\n```\n\n### Session\n\n**Sessions** are lightweight containers for causally chained sequences of **transactions**. They borrow **connections** from the connection pool as required and chain transactions using **bookmarks**.\n\n```php\nuse Laudis\\Neo4j\\Databags\\SessionConfiguration;\nuse Laudis\\Neo4j\\Enum\\AccessMode;\n\n$session = $driver-\u003ecreateSession(SessionConfiguration::create()\n    -\u003ewithDatabase('my-database')\n    -\u003ewithAccessMode(AccessMode::READ())\n);\n```\n\n### Transaction\n\n**Transactions** are atomic units of work that may contain one or more **query**. Each transaction is bound to a single **connection** and is represented in the causal chain by a **bookmark**.\n\n### Statement\n\n**Queries** are executable units within **transactions** and consist of a Cypher string and a keyed parameter set. Each query outputs a **result** that may contain zero or more **records**.\n\n### Result\n\nA **result** contains the output from a **query**, made up of header metadata, content **records** and summary metadata. In Neo4j 4.0 and above, applications have control over the flow of result data.\n\n\n## In-depth configuration\n\n### Url Schemes\n\nThe URL scheme is the easiest way to configure the driver.\n\nConfiguration format:\n```\n'\u003cscheme\u003e://\u003cuser\u003e:\u003cpassword\u003e@\u003chost\u003e:\u003cport\u003e?database=\u003cdatabase\u003e'\n```\n\nDefault configuration:\n```\nbolt://localhost:7687?database=neo4j\n```\n\n#### Scheme configuration matrix\n\nThis library supports three drivers: bolt, HTTP and neo4j. The scheme part of the url determines the driver.\n\n| driver | scheme | valid certificate | self-signed certificate                      | function                      |\n|--------|--------|-------------------|----------------------------------------------|-------------------------------|\n| neo4j  | neo4j  | neo4j+s           | neo4j+ssc                                    | Client side routing over bolt |\n| bolt   | bolt   | bolt+s            | bolt+ssc                                     | Single server over bolt       |\n| http   | http   | https             | configured through PSR Client implementation | Single server over HTTP       |\n\n### Configuration objects\n\nA driver, session and transaction can be configured using configuration objects. An overview of the configuration options can be found here:\n\n| name              | concept     | description                                                                      | class                      |\n|-------------------|-------------|----------------------------------------------------------------------------------|----------------------------|\n| user agent        | driver      | The user agent used to identify the client to the neo4j server.                  | `DriverConfiguration`      |\n| Http PSR Bindings | driver      | The relevant PSR implementation used by the driver when using the HTTP protocol. | `DriverConfiguration`      |\n| database          | session     | The database to connect to.                                                      | `SessionConfiguration`     |\n| fetch size        | session     | The amount of rows to fetch at once.                                             | `SessionConfiguration`     |\n| access mode       | session     | The default mode when accessing the server.                                      | `SessionConfiguration`     |\n| bookmarks         | session     | The bookmarks used in the session. (experimental)                                | `SessionConfiguration`     |\n| metadata          | transaction | The metadata used during the transaction. (experimental)                         | `TransactionConfiguration` |\n| timeout           | transaction | The maximum amount of time before timing out.                                    | `TransactionConfiguration` |\n\nCode Example:\n\n```php\nuse \\Laudis\\Neo4j\\Databags\\DriverConfiguration;\nuse Laudis\\Neo4j\\Databags\\SessionConfiguration;\nuse Laudis\\Neo4j\\Databags\\TransactionConfiguration;\n\n$client = \\Laudis\\Neo4j\\ClientBuilder::create()\n    -\u003ewithDefaultDriverConfiguration(DriverConfiguration::default()-\u003ewithUserAgent('MyApp/1.0.0'))\n    -\u003ewithDefaultSessionConfiguration(SessionConfiguration::default()-\u003ewithDatabase('app-database'))\n    -\u003ewithDefaultTransactionConfiguration(TransactionConfiguration::default()-\u003ewithTimeout(5.0))\n    -\u003ebuild();\n\n// The client will run the query on a driver with the provided config,\n// which spawns a session with the provided session config\n// and runs the query in a transaction with the provided transaction config\n$client-\u003erun('MATCH (x) RETURN count(x) AS count');\n\n// More granular control can be achieved by requesting the concepts yourself:\n$tsx = $client-\u003egetDriver('default')\n    -\u003ecreateSession(SessionConfiguration::default()-\u003ewithDatabase('management-database'))\n    -\u003ebeginTransaction(null, TransactionConfiguration::default()-\u003ewithTimeout(200));\n\n$tsx-\u003erun('SOME REALLY LONG MANAGEMENT QUERY');\n\n$tsx-\u003ecommit();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneo4j-php%2Fneo4j-php-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneo4j-php%2Fneo4j-php-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneo4j-php%2Fneo4j-php-client/lists"}