Download the PHP package akito-tsukahara/laravel-di-scope without Composer
On this page you can find all versions of the php package akito-tsukahara/laravel-di-scope. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download akito-tsukahara/laravel-di-scope
More information about akito-tsukahara/laravel-di-scope
Files in akito-tsukahara/laravel-di-scope
Download akito-tsukahara/laravel-di-scope
More information about akito-tsukahara/laravel-di-scope
Files in akito-tsukahara/laravel-di-scope
Vendor akito-tsukahara
Package laravel-di-scope
Short Description Visualize and validate Laravel DI container bindings
License MIT
Package laravel-di-scope
Short Description Visualize and validate Laravel DI container bindings
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-di-scope
Laravel DI Scope
Laravelのサービスコンテナのバインディング情報を解析し、依存関係の可視化とアーキテクチャルールの検証を行うパッケージ。
特徴
- 🔍 バインディング可視化: サービスコンテナに登録された全バインディングを一覧表示
- 📂 ディレクトリスキャン:
app/配下のクラスを自動スキャンして依存関係を解析 - 🎯 メソッドインジェクション対応:
__construct、__invoke、handleメソッドの依存を解析 - 🌳 依存ツリー構築: クラス間の依存関係を再帰的に解決・表示
- ✅ ルール検証: 定義したアーキテクチャルールに違反する依存を検出
- 📊 グラフ出力: Mermaid形式で依存関係を可視化(違反は赤色でハイライト)
- 🔄 CI連携: 違反があればexit code 1を返すためCIパイプラインに組み込み可能
動作要件
- PHP 8.2以上
- Laravel 10.x / 11.x / 12.x
インストール
設定
設定ファイルをpublish:
スキャン設定
config/di-scope.php でスキャン対象を設定:
依存解析の除外設定
フレームワークの依存など、グラフに含めたくないクラスを除外:
アーキテクチャルール
レイヤー間の依存ルールを定義:
使い方
バインディング一覧を表示
ルール違反を検出
出力例:
依存グラフを出力
出力例(Mermaid)
違反エッジは赤色でハイライトされます:
CI連携
GitHub Actions
違反があるとexit code 1が返されるため、CIが失敗します。
ユースケース例
クリーンアーキテクチャの検証
レイヤードアーキテクチャの検証
ライセンス
MIT
All versions of laravel-di-scope with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.2
illuminate/container Version ^10.0|^11.0|^12.0
illuminate/console Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/container Version ^10.0|^11.0|^12.0
illuminate/console Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.0
The package akito-tsukahara/laravel-di-scope contains the following files
Loading the files please wait ...