feat/config provider refactoring candidate#13
Merged
ralflang merged 5 commits intoFRAMEWORK_6_0from Mar 2, 2026
Merged
Conversation
Introduce a new ConfigProvider system to replace the legacy Config/Configs architecture with a modern, layered configuration approach. New ConfigProvider System: - CliConfigProvider: CLI arguments with kebab-case → dot notation - EnvironmentConfigProvider: Environment variables - PhpConfigFileProvider: PHP config files (~/.config/horde/components.php) - BuiltinConfigProvider: Default fallback values - ConfigProviderFactory: Builds provider chains with proper precedence - EffectiveConfigProvider: Hierarchical access (CLI > Env > User > Legacy > Builtin) Features: - Clear precedence order with layer introspection - Dot notation for config keys (e.g., github.token, author.name) - Type-safe with proper defaults - Supports merging config from multiple sources This is the foundation for removing the legacy Config system. Part of config system modernization.
BREAKING CHANGE: Module::handle() signature changed Changed Module interface from: handle(Config $config): bool To: handle(array $options, array $arguments, ?Component $component): bool Updated all 22+ modules to use new signature: - Modules receive options/arguments/component directly as parameters - Get ConfigProvider via DI when needed (ConfigProviderFactory) - No Config wrapper object needed Updated Components.php: - Parse CLI options/arguments once - Identify component once - Pass directly to module->handle() - Removed _prepareConfig() and _prepareConfigAdapter() This decouples the Module system from the legacy Config architecture and enables the next step: removing Config/Configs entirely. Breaks compatibility: Any external modules implementing Module interface must update their handle() signature.
BREAKING CHANGE: Removed Config/Configs classes Deleted legacy Config system: - src/Config/Base.php, Bootstrap.php, CliConfig.php, File.php - src/Configs.php (multi-config container) Added minimal Config interface for Component compatibility: - src/Config.php: Minimal interface (35 lines) - src/Config/MinimalConfig.php: Runtime implementation (85 lines) Updated all 21 runners to remove Config dependency: - Website, Init, Git, Github, Qc, Release, Pullrequest - Change, Composer, ConventionalCommit - CiSetup, CiPrebuild, Dependencies, Snapshot, Status - Update, Fetchdocs, Webdocs, Installer, Pipeline, Distribute Runners now use constructor injection with explicit parameters instead of Config wrapper. Component classes still use minimal Config interface for backward compatibility within Component hierarchy. Net deletion: 1,557 lines removed from legacy system.
Fix multiple broken commands: release (missing GithubApiConfig), PR commands (undefined config property), status (not instantiating runner), package (print_r type), changed (wrong doc directory), git (missing path separators and return statement).
Display clear usage instructions with examples when changed command is invoked without a changelog message.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Major refactor with breaking changes - Move from the old Configs framework to the new ConfigProvider framework.