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

klaussilveira/neo4j-ogm-bundle

Symfony bundle integrating the Neo4j PHP OGM, letting you map PHP entities to graph nodes, use repositories, and wire entity managers through Symfony's DI container. Includes annotation/attribute mapping and configuration for Neo4j connections.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • The package is a Symfony2 bundle wrapping an early-generation Neo4j PHP Object Graph Mapper. It assumes Symfony2 kernel/DI conventions, Doctrine-style annotations, and a Neo4j server compatible with the OGM’s Bolt/HTTP era.
  • Fit is narrow: legacy Symfony 2.7/2.8 applications on PHP 5.6/7.x with Neo4j 2.x/3.x and graph-centric domain models. It is a poor fit for Symfony 5/6/7, PHP 8.1+, Neo4j 4/5, API-first services, or teams standardizing on the official Neo4j PHP driver.
  • The OGM abstraction adds entity mapping and repositories but also coupling. A TPM should treat it as an anti-corruption-layer candidate, not a strategic platform dependency.

Integration feasibility

  • Composer installation is only feasible if legacy dependency constraints resolve. Modern Symfony applications will likely hit conflicts with Symfony components, annotations, PSR versions, and PHP requirements.
  • Integration requires bundle registration, OGM configuration, entity annotations, and a Neo4j connection. There is no Symfony Flex recipe, autowiring story, or modern configuration path.
  • A greenfield integration should be rejected. A legacy integration is possible but should be time-boxed as a spike, with a fallback to the official neo4j/neo4j-php-client behind repository interfaces.
  • Productionization would likely require forking the bundle, patching dependencies, and owning compatibility work.

Technical risk

  • High risk. The package has low community traction (29 stars, low score/opportunity signals), Symfony2 is end-of-life, and the OGM layer is unlikely to support current Neo4j protocol versions, transactions, clustering, or async patterns.
  • Security and dependency risk are elevated: unmaintained transitive dependencies, old annotation/cache libraries, and no predictable patch cadence.
  • Mapping and query risk: annotation metadata parsing, lazy loading, and OGM-generated Cypher may not cover complex graph patterns or perform acceptably at scale.
  • Vendor/abstraction lock-in: migrating off a non-standard OGM later is harder than starting with the official driver or plain Cypher.

Key questions

  • Which exact Symfony, PHP, and Neo4j versions are in scope, and is the target application legacy or modern?
  • Do we need OGM entity mapping, or can repositories wrap the official Neo4j PHP driver directly?
  • Is there an internal fork, maintainer, or paid support path for this bundle?
  • What Neo4j topology is required (single instance, cluster, Aura), and does the OGM support the required routing/transaction semantics?
  • Can the OGM be isolated behind interfaces so it can be replaced without rewriting domain code?
  • What is the cost of migrating to the official driver versus patching this bundle for another 12–24 months?

Integration Approach

Stack fit

  • Best fit: PHP 5.6/7.x, Symfony 2.7/2.8, Neo4j 2.3/3.x, monolithic legacy application with existing OGM annotations.
  • Poor fit: Symfony 5+/PHP 8+, Neo4j 4/5, containerized microservices, serverless, or teams without deep Neo4j/Cypher expertise.
  • If the stack is modern, do not adopt this bundle. Use neo4j/neo4j-php-client or plain Cypher behind repository interfaces, and map domain objects explicitly.

Migration path

  • Greenfield/modern: reject the bundle and standardize on the official Neo4j PHP driver. Define repository interfaces, implement Cypher queries, and keep graph access behind an anti-corruption layer.
  • Legacy application with existing bundle usage: pin all dependency versions, fork the repository internally, and document the supported PHP/Symfony/Neo4j matrix.
  • If Neo4j is being upgraded from 3.x to 4/5, replace the OGM before or during the upgrade. Do not carry the OGM across a major Neo4j protocol change without a compatibility spike.
  • If the bundle must remain temporarily, wrap it behind application-owned interfaces and add contract tests so replacement is feasible.

Compatibility

  • Verify Composer constraints for PHP, Symfony components, doctrine/annotations, cache libraries, and the underlying OGM/driver.
  • Confirm Neo4j server compatibility via Bolt/HTTP, including authentication, TLS, and transaction behavior.
  • Expect conflicts with Symfony Flex, autowiring, modern PSR standards, and PHP 8 deprecations.
  • Test against the real Neo4j version in staging; unit tests with mocks will not catch protocol or Cypher-generation mismatches.

Sequencing

  1. Inventory current Symfony/PHP/Neo4j versions and all existing OGM usage.
  2. Run a time-boxed compatibility spike with pinned dependencies in a branch.
  3. Isolate OGM access behind repository/domain interfaces.
  4. Add integration tests against a real Neo4j instance, covering transactions and lazy loading.
  5. If incompatible, replace with the official driver and migrate queries incrementally.
  6. Plan data migration and dual-write only if graph writes must be preserved during cutover.
  7. Decommission the bundle and remove legacy annotations once replacement is stable.

Operational Impact

Maintenance

  • High maintenance burden. The bundle is effectively unmaintained for modern stacks, so the organization would own forks, dependency patches, and Neo4j compatibility.
  • Low community activity means few eyes on regressions. Internal ownership must be explicit, with a documented upgrade and security-patch process.
  • Annotation metadata and cache behavior can create environment-specific failures that are hard to reproduce.

Support

  • No vendor support. Community support is minimal and likely stale; GitHub issues may not be answered.
  • Documentation is sparse for modern onboarding. Expect reliance on source reading and internal runbooks.
  • If the bundle becomes business-critical, budget for an internal subject-matter expert or a paid contractor familiar with legacy Symfony/Neo4j.

Scaling

  • Scaling is primarily a Neo4j concern: cluster topology, read replicas, causal consistency, and query tuning. The bundle does not solve these.
  • The OGM can add overhead through annotation parsing, entity hydration, lazy loading, and chatty Cypher. Watch for N+1 query patterns and unbounded traversals.
  • PHP application nodes are generally stateless and horizontally scalable, but OGM session/connection handling must be verified under load.
  • No meaningful async/reactive support; high-throughput graph workloads should use the official driver with explicit query control.

Failure modes

  • Composer dependency resolution failures during routine updates.
  • PHP fatal errors or deprecations when the runtime is upgraded.
  • Neo4j protocol/auth/TLS mismatch after a server upgrade.
  • Transaction leaks or unclosed sessions under exceptions.
  • Entity mapping errors, lazy-loading exceptions, and cache invalidation bugs.
  • OGM-generated Cypher that performs poorly or behaves differently across Neo4j versions.
  • Cluster routing/read-after-write anomalies if the OGM does not support causal consistency.

Ramp-up

  • Engineers need Neo4j graph modeling, Cypher, OGM annotations, and legacy Symfony2 knowledge. Expect 1–2 weeks for basic productivity and 4–6 weeks for production hardening or migration.
  • Sparse documentation increases ramp-up time. Pairing and internal examples are essential.
  • A TPM should plan for a parallel modernization track: keep the legacy bundle running only as long as the migration to the official driver or a maintained OGM is funded.
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.
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
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle