← All Packages

furybee/php-deps

Static analysis tool for visualizing PHP class dependencies and call graphs. Analyze your codebase in seconds, explore thousands of classes interactively.

PHP 8.1+ MIT License Laravel

Quick Start

# Clone and install
git clone [email protected]:furybee/php-deps.git
cd php-deps && composer install
# Run the analyzer
php analyze.php
# Open the viewer
open viewer/index.html

Already have nikic/php-parser in your project (via PHPStan/Larastan)? Skip composer install — it'll use your existing vendor/.

Features

🔍 Full Call Graph

Classes, methods, calls, instantiations, DI resolution — everything extracted.

🧠 Type-Aware Analysis

Resolves constructor injection, method injection, property types, app() calls.

🌐 Interactive WebGL Viewer

Sigma.js v2 + Graphology — handles 10k+ nodes smoothly with ForceAtlas2 layout.

📦 Layer Detection

Auto-categorizes: Controller, Service, Model, Job, Action, and more.

🔎 Search & Filter

Find classes instantly, filter by layer or edge type.

⚡ Laravel Optimized

Understands service injection, app() helper, Form Requests, and more.

📄 Zero-Dependency Viewer

Single HTML file, loads via CDN, works offline with file picker. No build step required.

CLI Options

php analyze.php [--dir=app] [--dir=app-modules] [--exclude=vendor] [--output=output/graph.json]
Option Default Description
--dir . Directories to scan (repeatable)
--exclude vendor,node_modules,… Comma-separated dirs to exclude
--output output/graph.json Output file path
GitHub Repository → Report Issue