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 Laravel Package

plumtreesystems/neo4j-php-client

A PHP client for Neo4j graph databases with Bolt and HTTP connections, transaction support, flexible result handling, and an expressive query API. Works well in PHP and Laravel applications that need reliable graph database access.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Confirm your app can move to the package’s 5.0.0 requirements and that your Neo4j server is 3.5+ or 4.0. Do not upgrade if you still run Neo4j 3.4 or older.
  • Look first at composer.json, the package README, the service provider, and the published config file. The release note is compatibility-focused, so version alignment is the first thing to verify.
  • Configure the connection through the package config/env values: URI/scheme, host, port, username, password, and database name where supported by Neo4j 4.0.
  • First use case: verify connectivity from Laravel with a trivial parameterized Cypher query such as RETURN 1 AS ok, then run one real read query against a small label before wiring graph access into application services.

Implementation Patterns

  • Resolve the package client/connection through Laravel’s container and inject it into repositories or dedicated graph services. Keep Cypher out of controllers.
  • Wrap graph access in repository methods with named parameters rather than interpolating values into Cypher strings.
  • Use transactions for multi-step writes and any workflow where partial graph updates would be invalid.
  • For Neo4j 4.0, explicitly verify whether the package/config expects a database name. If multi-database support is exposed, make the target database part of configuration rather than hard-coding it.
  • Add a small health check or artisan command that opens a connection and runs a lightweight query. This is useful during deployment and after config changes.
  • Use graph-specific test fixtures or an ephemeral Neo4j container matching the production major version. Test against both 3.5 and 4.0 only if you actually support both.
  • Keep result mapping close to the repository layer: convert Neo4j records into DTOs/arrays before passing data into Laravel domain services.

Gotchas and Tips

  • The 5.0.0 compatibility change is the main risk: older Neo4j versions are no longer a safe target. Check production server versions before upgrading.
  • Neo4j 4.0 brings driver/protocol and authentication differences. Confirm the URI scheme, credentials, and any database-selection config against the package docs.
  • Clear Laravel’s config cache after changing Neo4j env values: php artisan config:clear.
  • Do not build Cypher with string concatenation. Use parameters; graph queries are still query injection surfaces.
  • Close sessions/results according to the package’s API and avoid retaining large result sets in memory.
  • If writes can conflict, use transaction retry handling or application-level retries with idempotent operations.
  • Test against the same Neo4j major version as production. A query that passes on 3.5 may behave differently on 4.0, especially around database selection and administrative commands.
  • Check the package’s release notes and issue tracker for driver-version constraints; “supports Neo4j 4.0” does not automatically mean every Neo4j 4.x minor version is validated.
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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package