Refactor Framework to Package-Based Monorepo Structure
まだ誰も着手していません。
評価
調査の方向性
まず現在の src/ のレイアウト、提案されている packages/ のフェーズ、およびルートの composer.json の autoloading を確認します。Core から App Glue までの migration checklist に沿って作業し、その後 test suite を実行して移行を検証します。完了の条件は、計画された packages/ が存在し、src/ が削除され、autoloading が更新され、tests が成功することです。
索引モデルが issue の本文から書いたものです。
説明
Description
Currently, the framework is a monolithic library with a mix of "Libraries", "Modules", and core components in src/. This structure creates tight coupling and unclear boundaries (e.g., Config depending on Loader which depends on App).
We propose moving to a Monorepo Structure using a packages/ directory. This will allow for:
- Strict Decoupling: Each package has its own
srcand explicit dependencies. - Clearer Architecture: Separation of
Core(Kernel) fromApp(Adapters) andFeatures(Http, Database). - Future-Proofing: Easier to extract/publish standalone components.
Proposed Structure
The src/ directory will be dissolved into packages/.
/packages
├── Core/ (Bootstrap: App Kernel, Container, Config, Loader, Env, Hook)
├── App/ (Glue: Web/Console Adapters, Traits)
├── Http/ (Request, Response, Middleware)
├── Console/ (Commands, Output)
├── Pipeline/ (New Shared Pipe Builder)
├── Database/ (ORM, Migrations)
├── Security/ (Csrf, Encryption, Hasher)
├── ... (See full plan for Auth, Session, etc.)
Synergy with Issue #373 (App Bootstrapping)
This refactoring directly supports the goals of Issue #373:
- Boot Pipeline: The new
packages/Pipelinecomponent enables the "Boot Stages" logic. - Explicit Kernel: Moving
App,Container, andLoadertopackages/Corephysically defines the "Application Execution Boundary". - DI Ownership: Centralizing
ContainerinCoremakes it the clear owner of service lifetimes.
Critical Changes
- Split
App:src/App/App.phpmoves topackages/Core.src/App/Adaptersmoves topackages/App. This resolves the circular dependency between the Kernel and the Http layer. - Config in Core:
src/Configmoves topackages/Coreto resolve dependencies onLoaderandDi. - Security Grouping:
Csrf,Encryption, andHasherare grouped underpackages/Security.
Migration Checklist
- Create
packages/directory structure. - Phase 1: Core: Move
App,Di,Environment,Hook,Loader,Config,Tracertopackages/Core. - Phase 2: Features: Move
Auth,Database,Session,View,Validationtopackages/*. - Phase 3: Http/Console: Move
Http,Console,Routertopackages/*. - Phase 4: App Glue: Move
AdaptersandTraitstopackages/App. - Phase 5: Cleanup: Remove empty
src/directories. - Phase 6: Wiring: Update root
composer.jsonautoloading to mapQuantum\to these new paths. - Run tests to verify the move.
- 主要言語
- PHP
- スター
- 36
- フォーク
- 22
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quantum-php/framework のほかの issue
-
routing testing
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
quantum-php/framework#547 ·
-
view
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
quantum-php/framework#542 ·
-
enhancement http
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
quantum-php/framework#565 · コメント 1 件 ·
-
components view
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
quantum-php/framework#551 ·
-
Add explicit @version special route token support for API major versioning within a single moduleオープンrouting
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
quantum-php/framework#550 ·
quantum-php/framework の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
filamentphp/filament#20630 ·
メンテナーはふだん 1 日以内に返信
-
needs-maintainer-review review:approve
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Ultimate-Multisite/ultimate-ai-connector-compatible-endpoints#163 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100