Topics:
eidcloudcall-graphcodebase-graphast-analysisblast-radiusdependency-graphphp8
Interactive AST Call-Graph and Dependency Topology Engine for PHP applications. Analyzes static code structures, maps class/method call trees down to database queries, and provides blast radius impact analysis to predict downstream breakage before committing code.
flowchart TD
A["PHP Source Code (*.php)"] --> B["AST Token & Reflection Parser"]
B --> C["Symbol Extractor (Namespaces, Classes, Methods)"]
C --> D["Call-Site Linker & Reference Graph"]
D --> E["Directed Acyclic Graph (DAG)"]
E --> F["Blast Radius Impact Engine"]
E --> G["Exporters (Mermaid, DOT, JSON, HTML)"]
- Deep AST Call Traversal: Resolves method calls, static invocations, dependency injection instantiations, and SQL queries.
- Blast Radius Impact Analysis: Calculates exact upstream callers and downstream dependencies when a symbol changes.
-
Complexity & Instability Metrics: Evaluates Afferent (
$C_a$ ) and Efferent ($C_e$ ) coupling and Martin Instability metric ($I = \frac{C_e}{C_a + C_e}$ ). - Multiple Exporters: Generates Mermaid diagrams, Graphviz DOT files, and machine-readable JSON dumps.
- Zero-Dependency Engine: Pure PHP 8.2+ with sub-millisecond graph synthesis.
git clone https://github.com/shadialhasan/eidcloud-codebase-graph.git
cd eidcloud-codebase-graph# Export Mermaid diagram to console
php bin/eidcloud-graph export ./src/ --format=mermaid
# Calculate Blast Radius for a specific class or method
php bin/eidcloud-graph impact ./src/ --symbol="App\Services\PaymentService::charge"
# Generate complete JSON graph dump
php bin/eidcloud-graph build ./src/ --out=callgraph.jsonphp tests/run_tests.phpEng. MHD. Shadi AL-Hasan
- Role: Executive CTO & Enterprise Solutions Architect
- Email: mhd.shadi.alhasan@gmail.com
- Phone / WhatsApp: +963934005922
- Location: Damascus, Syria
- GitHub: shadialhasan
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2026 MHD. Shadi AL-Hasan. All rights reserved.