Remove Loader as a top-level package and split its responsibilities across Config, Environment, and helper boot
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Bắt đầu bằng cách truy vết các trách nhiệm và cách sử dụng trong src/Loader/Loader.php, src/Loader/Setup.php, src/Config/Config.php, src/Environment/Environment.php, src/Storage/Uploads/UploadConfigProvider.php và src/App/Stages/LoadHelpersStage.php. Xác minh hành vi phân giải phân cấp hiện có và xác định các test cũng như tài liệu bị ảnh hưởng trước khi tách quyền sở hữu. Công việc được xem là hoàn tất khi Loader không còn là package cấp cao nhất, các chủ sở hữu mới duy trì hành vi tương thích, và các test cũng như tài liệu được cập nhật khi cần.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Refactor the current Loader package out of the top-level framework architecture.
Its responsibilities should be split into the places that actually own them:
- hierarchical config file resolution should belong to
Config - environment bootstrap file resolution should belong to
Environment - helper loading should be handled separately and should not justify
Loaderremaining its own package
Why
Right now Loader acts like a standalone package, but the code shows it is mostly a shared utility for unrelated internal concerns.
Current usages include:
Configloading hierarchical config filesEnvironmentloading env bootstrap configUploadConfigProviderprobing/loading optional uploads config- helper directory loading during boot
This is a weak package boundary.
The most obvious mismatch is Environment: environment bootstrap should not depend on a separate generic loader package just to resolve a small config file that determines which .env file to load.
Current Behavior to Preserve
For config loading, preserve the current hierarchical resolution behavior:
- resolve the module-scoped file first
- if the setup is hierarchical and the module file does not exist, fall back to the shared file
For config imports that currently means:
modules/<module>/config/<file>.php- then
shared/config/<file>.php
Proposed Changes
- remove
Loaderas a standalone top-level package concept - move hierarchical config file resolution into
Config - move environment bootstrap file resolution into
Environment - update
UploadConfigProviderso its optional config lookup follows the new ownership boundaries - keep helper loading as a separate concern and do not let it define the long-term architecture of
Loader
Acceptance Criteria
Loaderis no longer treated as a standalone top-level packageConfigowns hierarchical config file resolutionEnvironmentno longer relies onLoaderfor its bootstrap config resolutionUploadConfigProviderno longer relies on a generic top-level loader abstraction if a more local ownership model is available- existing hierarchical config behavior remains compatible
- tests and docs are updated as needed
Notes
Relevant code:
src/Loader/Loader.phpsrc/Loader/Setup.phpsrc/Config/Config.phpsrc/Environment/Environment.phpsrc/Storage/Uploads/UploadConfigProvider.phpsrc/App/Stages/LoadHelpersStage.php
- Ngôn ngữ chính
- PHP
- Star
- 36
- Fork
- 22
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của quantum-php/framework
-
routing testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
quantum-php/framework#547 ·
-
view
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
quantum-php/framework#542 ·
-
enhancement http
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
quantum-php/framework#565 · 1 bình luận ·
-
components view
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 42/100
quantum-php/framework#551 ·
-
Add explicit @version special route token support for API major versioning within a single moduleĐang mởrouting
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
quantum-php/framework#550 ·
Tất cả issue của quantum-php/framework
Issue tương tự
-
[Sync EN] Fix session read handler docs: false reports a failure, not a missing session (#5902)Đang mởsync-en
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 2 ngày
-
feature-request needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
aws/aws-sdk-php#3365 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
-
bug status: unverified
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
woocommerce/google-listings-and-ads#3884 ·
Maintainer thường phản hồi trong vòng 1 ngày