clue/graph
Clue\Graph is a lightweight graph/network library for PHP that models nodes and edges so you can traverse, query, and analyze connected data. It works with graphs, trees, and other structures via a simple API.
Adopt when:
Look elsewhere when:
graphp/algorithms or move to a language/ecosystem with a mature graph stack.networkx is better maintained and better documented, and a small sidecar may be cheaper than a stale PHP dependency.Diligence items before committing: check the actual algorithm coverage (don't inherit the README's implied scope), confirm PHP version support and test coverage, and grep the issue tracker for abandonment signals.
To executives: This is a small, free, MIT-licensed PHP library that lets us model relationships — dependencies, hierarchies, workflows — inside our existing application instead of buying or building a graph database. It's a low-cost way to test whether a graph model earns its place on the roadmap before we spend on infrastructure. The tradeoff is honest: the project hasn't shipped a release since 2021, so we treat it as a replaceable implementation detail, not a platform bet.
To engineering: It gives us clean vertex/edge primitives and traversal without new services or deployment surface, and it's small enough to vendor or fork if the upstream goes quiet. The conditions are explicit: we wrap it behind our own interface, pin the version, verify PHP compatibility and algorithm coverage up front, and keep it out of hot paths and security-sensitive code. If the graph outgrows in-process traversal, the wrapper makes the swap to a real graph store a contained change rather than a rewrite.
How can I help you explore Laravel packages today?