Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Remove Loader as a top-level package and split its responsibilities across Config, Environment, and helper boot

Đang mở
#535 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
php
Lĩnh vực
backend

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ả

config

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 Loader remaining 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:

  • Config loading hierarchical config files
  • Environment loading env bootstrap config
  • UploadConfigProvider probing/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 Loader as a standalone top-level package concept
  • move hierarchical config file resolution into Config
  • move environment bootstrap file resolution into Environment
  • update UploadConfigProvider so 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

  • Loader is no longer treated as a standalone top-level package
  • Config owns hierarchical config file resolution
  • Environment no longer relies on Loader for its bootstrap config resolution
  • UploadConfigProvider no 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.php
  • src/Loader/Setup.php
  • src/Config/Config.php
  • src/Environment/Environment.php
  • src/Storage/Uploads/UploadConfigProvider.php
  • src/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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của quantum-php/framework

Tất cả issue của quantum-php/framework

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.