Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Neo4J Php Client

Neo4J Php Client Laravel Package

laudis/neo4j-php-client

PHP client and driver for Neo4j, giving Laravel and PHP apps a clean, intuitive API to the graph database. Choose Bolt or auto-routed drivers, configure easily, and rely on full psalm typing, extensibility, and official Neo4j testkit validation.

View on GitHub
Deep Wiki
Context7

Php client and driver for neo4j database

Frequently asked questions about Neo4J Php Client
How do I install and configure laudis/neo4j-php-client in a Laravel app?
Run composer require laudis/neo4j-php-client, then bind a single Laudis\Neo4j\Client instance into Laravel's container, typically from a small custom service provider that reads Bolt or neo4j:// connection details from config. The package ships no auto-discovery or config stub, so the connection string, credentials and driver choice are yours to own. Budget one to three engineer days for the wiring, a connection check and a health endpoint.
Which PHP and Neo4j server versions does this package support?
Version ^3.x requires PHP ^8.0 and supports Neo4j ^4.0 and ^5.0, while ^2.8 covers PHP 7.4 and 8.x against Neo4j 3.5/4.x. Pin the constraint deliberately, because legacy PHP applications cannot take the latest release. Verify the installed driver version against your server version before upgrading Neo4j.
Is there a Laravel service provider, facade or config file included?
No. The package ships no service provider, facade, config stub or health check; the README only links to a Laravel realworld example. Most teams register a singleton Client bound to an interface and publish their own config. That is a small, well-understood integration cost rather than a blocker.
Can I use this package as an Eloquent-style ORM for Neo4j?
No, it is a driver and not an ORM. There are no Eloquent models, migrations, relationship mapping or Cypher query builder, so the persistence abstraction, DTO hydration and query ownership are yours to build. Treat it like a raw PDO connection positioned as a secondary datastore for genuinely graph-shaped domains.
Which drivers are available, and does it work with Neo4j Aura and clustered deployments?
The package offers a Bolt driver for direct connections and an auto-routed driver for clusters, selected through the connection URI such as bolt://, bolt+s://, neo4j:// or neo4j+s://. The neo4j schemes are what Neo4j Aura and routed cluster topologies expect. Note that the HTTP and HTTPS drivers were removed in 3.3.0, so raw sockets are mandatory.
How do transaction functions and automatic retries work in this driver?
Session transaction functions automatically retry on transient errors, so the closure must be idempotent. Never dispatch jobs, increment counters, emit events or call external APIs inside it, or those side effects will duplicate under retry. Use unmanaged transactions or auto-committed queries only when you deliberately accept a different risk profile.
Why does my query run out of memory on large result sets?
Results are materialised as CypherList and CypherMap objects wrapping typed Node, Relationship and Path values rather than streamed row by row. An unbounded MATCH (n) RETURN n will exhaust PHP memory instead of paging. Enforce LIMIT, projections and pagination discipline in code review.
How do I bind parameters like lists, maps and dates into Cypher queries?
Empty PHP arrays are ambiguous between a Cypher list and a map, so wrap them with ParameterHelper. DateTimeInterface values map to the DateTimeZoneId type, and Vector values are decode-only. Each is a small, discoverable trap worth documenting in a team style guide.
What PHP extensions and network access do I need in production and CI?
You need ext-bcmath, ext-json and ext-sockets compiled into every image and CI runner. Outbound TCP to the Bolt port, typically 7687, plus TLS for the bolt+s and neo4j+s schemes, must be allowed. Serverless or restricted-egress environments are a real risk here because there is no HTTP fallback.
Is this package well maintained, and how should I test and de-risk the integration?
The driver is built in collaboration with the official Neo4j team and validated against testkit, with full Psalm typing, which materially reduces protocol-correctness risk. Low star counts and few listed dependents are still a bus-factor concern for a critical-path component. Hide it behind your own GraphClient interface so substitution is a bounded change, and run integration tests against a real Neo4j instance in CI.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib