Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#535 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
45/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
php
Área
backend

Línea de trabajo

Empieza por rastrear las responsabilidades y los usos en src/Loader/Loader.php, src/Loader/Setup.php, src/Config/Config.php, src/Environment/Environment.php, src/Storage/Uploads/UploadConfigProvider.php y src/App/Stages/LoadHelpersStage.php. Verifica el comportamiento de resolución jerárquica existente e identifica las pruebas y la documentación afectadas antes de separar las responsabilidades. Se considera terminado cuando Loader ya no sea un paquete de nivel superior, los nuevos responsables conserven un comportamiento compatible y las pruebas y la documentación se hayan actualizado según sea necesario.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
PHP
Estrellas
36
Forks
22
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de quantum-php/framework

Todos los issues de quantum-php/framework

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.