Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Semitexa Project Graph helps you trace structural relationships in a PHP application before changing code: for example, which handler consumes a payload, what a handler returns, and which components may sit downstream of a change. Use it to narrow your investigation—not to replace reading the source or running tests.

What Project Graph indexes

semitexa-project-graph is an optional package that scans PHP source and Semitexa attributes, extracts structural facts, and stores them as a directed graph. Its documented nodes include routes, payloads, handlers, services, events, and execution flows. Typed edges describe relationships such as handles, returns, implements, and cross-module dependencies. That structure can answer questions spanning multiple files more directly than an architecture diagram that someone must maintain by hand. Semitexa’s Project Graph overview gives the package’s explanation and examples.

For example, a graph slice can connect BlogIndexPayload to BlogIndexHandler, then show that the handler returns BlogIndexResource and implements TypedHandlerInterface. Those are extracted relationships to check against the code, not proof of every runtime path.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The package uses a separate project_graph database connection; the overview also describes a local SQLite fallback. Installation requirements and releases can change, so check the current Packagist package record for the PHP requirement and version applicable to your project. The record accessed October 7, 2026 listed version 2026.08.25.0718, published August 25, 2026, and PHP ^8.4.

How to investigate a change before editing

  1. Name the target. Start with the route, class, payload, event, or module you expect to change.
  2. Ask one structural question. For example: “What handles this payload?” Use a usage or dependency query for direct relationships, a module view for broader context, or impact analysis to estimate downstream reach.
  3. Check index state. Run bin/semitexa ai:review-graph:stats --json to inspect graph statistics. If the stored graph may not include relevant source changes, regenerate it with bin/semitexa ai:review-graph:generate --json.
  4. Inspect the result. Follow important edges into their source files. Confirm that the relationship still exists and understand the implementation around it.
  5. Validate the edit independently. Run the relevant tests and runtime checks after changing code. The graph reports extracted structure; it does not establish that behavior is correct.

The usage-query example in Semitexa’s overview finds BlogIndexHandler as a consumer of BlogIndexPayload through a handles relationship. Impact analysis walks downstream relationships and groups affected nodes by distance and module. A shallow depth is useful for a focused change; shared interfaces or services can have a broader estimated radius.

Which graph command fits the question?

The available command surfaces depend on semitexa-project-graph being installed and enabled. Semitexa’s Project Graph documentation describes these ways to explore the graph:

  • show: display a readable slice around a node.
  • query: ask usage and dependency questions.
  • module: inspect a module overview.
  • intelligence: ask higher-level structural questions, such as where hotspots or documentation gaps may be.
  • context: gather task-scoped structural context.
  • impact: estimate downstream reach from a target.
  • Watch mode: keep the graph current during active work.

For an AI coding assistant, task-scoped graph context can provide relevant nodes, edges, and source snippets without sending an unnecessarily large set of files. Treat that context as a starting point: open the source behind consequential relationships before asking the assistant to make or assess a change. The Semitexa Dev CLI documentation describes the CLI surfaces.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When to use graph queries and when to use text search

Tool Best question Typical scope How to validate
Project Graph Which handler consumes this payload, or what depends on this class? Typed relationships across files and modules. Inspect the relevant source and run tests or runtime checks.
Text search Where does this exact string, method name, or implementation detail appear? Literal matches in the searchable files. Read each relevant match in context and verify behavior.

The tools complement each other. Graph queries follow relationships the index has extracted; text search is useful for exact strings and local implementation details. Semitexa’s Dev CLI documentation discusses the CLI context, while its Project Graph documentation covers graph queries.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What impact analysis can—and cannot—tell you

Impact analysis is an estimate over the indexed graph. A missing edge does not prove there is no dependency: the graph may be stale or may not represent a relationship in the way your question assumes. Conversely, a reported edge does not prove that a particular runtime behavior occurs. Use the result to identify files and modules worth inspecting, then verify the actual change with source review, tests, and runtime checks.

For reliable results, check graph statistics before relying on a stored index, regenerate it when relevant source may have changed, and keep the question narrow enough that you can inspect the returned relationships. No published effectiveness statistic is established for the package, so its value here is practical: it can make cross-file structural investigation more targeted, but it does not replace verification.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.