Download the PHP package naokioouchi/laravel-circular-detector without Composer
On this page you can find all versions of the php package naokioouchi/laravel-circular-detector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download naokioouchi/laravel-circular-detector
More information about naokioouchi/laravel-circular-detector
Files in naokioouchi/laravel-circular-detector
Package laravel-circular-detector
Short Description A Laravel package to detect and visualize circular dependencies in modular monolith architectures
License MIT
Homepage https://github.com/NaokiOouchi/laravel-circular-dependency-detector
Informations about the package laravel-circular-detector
Laravel Circular Dependency Detector
A powerful Laravel package for detecting and visualizing circular dependencies in modular monolith architectures.
Features
- 🔍 Circular Dependency Detection: Automatically detect circular dependencies between modules using depth-first search algorithm
- 📊 Multiple Output Formats: Console, JSON, DOT (Graphviz), and Mermaid diagram formats
- 📈 Dependency Visualization: Generate interactive dependency graphs
- ⚡ Performance Optimized: Efficiently analyze large codebases with 100+ modules
- 🎯 Laravel Integration: Seamless integration with Laravel's service container and console commands
Installation
Install the package via Composer:
Publishing Configuration
After installation, publish the configuration file to customize it for your project:
This will create config/circular-dependency-detector.php in your Laravel application where you can customize all settings.
Alternative: Without Publishing Config
If you don't want to publish the config, you can also configure it via environment variables or directly in your config/app.php:
Configuration
Edit config/circular-dependency-detector.php to customize:
Example for packages/ directory structure (DDD/Ports and Adapters)
Usage
Detect Circular Dependencies
Options:
--path=: Override modules path (e.g., app/Domain, src/Services)--format={console|json|dot|mermaid}: Output format (default: console)--output=path: Save output to file
Examples:
Generate Dependency Graph
Options:
--format={dot|mermaid}: Graph format (default: dot)--output=path: Save graph to file
Examples:
Output Examples
Console Output
JSON Output
DOT Graph Output
Mermaid Diagram Output
CI/CD Integration
GitHub Actions
GitLab CI
Performance
The package is optimized for performance:
- 100 modules: Analysis completes in under 30 seconds
- Memory usage: Less than 512MB for large projects
- File limit: Supports up to 10,000 PHP files
Requirements
- PHP ^8.1
- Laravel 10.x, 11.x, or 12.x
- nikic/php-parser ^4.15
Testing
Run the test suite:
Run specific test suites:
Troubleshooting
No modules found
Check that your modules_path in the configuration points to the correct directory:
Missing dependencies
Some dependencies might not be detected if they use dynamic class resolution. Consider adding explicit use statements.
Performance issues
For large codebases, you can optimize by:
- Adjusting
ignore_patternsto skip unnecessary directories - Limiting
scan_patternsto essential directories only
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
If you encounter any issues or have feature requests, please create an issue on GitHub.
License
MIT
All versions of laravel-circular-detector with dependencies
nikic/php-parser Version ^4.15|^5.0
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/console Version ^10.0|^11.0|^12.0