PHPFlow v0.1.0
PHPFlow is an open-source static flow analyzer for modern Symfony applications.
It reconstructs application flows from HTTP routes and Messenger messages through controllers, handlers, services and repositories, all the way to database effects, external HTTP calls, responses and exceptions — without running the target application.
What can PHPFlow help you understand?
PHPFlow is designed to answer questions such as:
- What happens when this HTTP route is called?
- Which entry points can reach this database table?
- What depends on this service?
- Where is this Messenger message handled?
- Which flows call this external API?
- Where can this exception surface?
Interactive graph
PHPFlow can generate a self-contained HTML viewer for exploring an application's architecture.
The viewer includes:
- functional swimlanes;
- Messenger / async boundaries;
- full-graph search;
- node and exploration filters;
- expand/collapse and branch focus;
- entry-point path highlighting;
- paths to effects;
- critical-path highlighting;
- minimap navigation for large graphs;
- detailed node metadata.
No external JavaScript or CDN is required.
Symfony support
v0.1.0 understands a growing set of common Symfony and PHP patterns, including:
#[Route]controllers and HTTP responses;- dependency-injected services;
- interface-to-implementation resolution;
- supported Symfony service aliases and configuration;
- Messenger dispatches, handlers, routing and transports;
- recursive service and repository calls;
- Doctrine DBAL and QueryBuilder operations;
SELECT,INSERT,UPDATEandDELETEeffects;- external HTTP calls;
- mail, filesystem and cache effects;
- conditions, guards, loops and
match; try/catch/finallyand exceptions;- recursive flows and cycle detection.
PHPFlow deliberately remains conservative: if it cannot prove a relationship from a supported static pattern, it does not invent one.
Impact analysis
PHPFlow can also work backwards from something you plan to change.
You can ask which application entry points are affected by:
- a database table or operation;
- an external HTTP endpoint;
- a Messenger message;
- a service;
- an exception.
Machine-readable output
v0.1.0 provides versioned formats for future tooling and CI integrations:
- Graph JSON — schema
1.2 - Impact JSON — schema
1.0 - Graph diff JSON — schema
1.0
Mermaid export is also available.
Try it
PHPFlow uses Docker for its repository workflow, so PHP does not need to be installed on the host.
After cloning the repository:
cd phpflow
make setup
make demoThen open:
/tmp/phpflow-demo.htmlThe bundled Symfony demo contains routes, Messenger flows, service aliases, Doctrine/DBAL effects, external HTTP calls, exceptions and control-flow examples.
Important: static analysis only
PHPFlow does not boot or execute the application being analyzed.
This is the core contract of the project.
A missing edge means PHPFlow could not prove the relationship from the static patterns it currently supports. It does not prove that the relationship can never happen at runtime.
This is only the beginning
v0.1.0 is the first public release.
The next priority is testing PHPFlow against real-world Symfony applications and learning which patterns, integrations and workflows matter most in practice.
If PHPFlow misses a pattern in your application, please open an issue with a minimal reproducible example.
Bug reports, unsupported-pattern reports and contributions are welcome.
If you try PHPFlow on a real Symfony project, feedback is especially valuable.
⭐ If the project is useful to you, starring the repository also helps other PHP developers discover it.