Add Japanese technical comparison with other PHP DI containers#334
Add Japanese technical comparison with other PHP DI containers#334koriym wants to merge 2 commits into
Conversation
Explain the design decisions that distinguish Ray.Di from PHP-DI, Symfony DI, and the Laravel container: type + qualifier binding keys, the type-checked binding DSL, contract-tested module composition precedence, integrated AOP, prototype-default scope, execution strategies, injection-context vocabulary, and diagnostics — with the trade-offs of each decision stated. Link the doc from README. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q7oj86ydbhXQotYy6BAEcu
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 2.x #334 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 460 460
===========================================
Files 53 53
Lines 1184 1184
===========================================
Hits 1184 1184 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Lead the binding-key section with the type + qualifier key design instead of arguing against PSR-11, and drop the dedicated PSR-11 trade-off paragraph in favor of a one-line adapter note. PSR-11 now appears only as a fact about the compared containers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q7oj86ydbhXQotYy6BAEcu
概要
PHP の他の DI コンテナ (PHP-DI / Symfony DependencyInjection / Laravel コンテナ) と Ray.Di の技術的な違いを解説する日本語ドキュメント
docs/comparison.ja.mdを追加し、README からリンクしました。対象読者は DI の基本概念を理解している層です。技術的な比較のみを扱い、人気やコミュニティ規模はスコープ外です。全体を「コンテナはサービスレジストリではなく、型からオブジェクトグラフを構築する injector である」というテーゼで貫き、機能の羅列ではなく設計判断とトレードオフとして記述しています。
構成
tests/di/README.md準拠)検証
demo/・tests/・src/の実在コードに基づき、API (Bind DSL / Matcher::any・annotatedWith / MethodInvocation / Scope 既定値 / Unbound 書式など) をソースと突合しましたbind()/scoped()など) は各公式ドキュメントで確認しました (2026-07 時点)php demo/run.phpを実行し demo 01〜10 の動作を確認。§8 の Unbound 出力は実際の実行出力を転載しています備考 (このPRのスコープ外の発見)
demo/12-dependency-chain-error-message.phpは、コメントと検証文字列が旧メッセージ形式 (dependency 'X' with name '' used in...) のままのため、現行の出力形式 ('X-' in file.php:7 ($param)) に対して "It DOES NOT work!" と表示されます。デモ自体の更新は本PRには含めていません。🤖 Generated with Claude Code
https://claude.ai/code/session_01Q7oj86ydbhXQotYy6BAEcu