定制 phpfit/config-builder 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

phpfit/config-builder

最新稳定版本:1.0.2

Composer 安装命令:

composer require phpfit/config-builder

包简介

Combine all configs from each phpfit packages and create or extends exists app config

README 文档

README

Composer plugin to get configs from all phpfit packages and combine them all to generate new config file on BASEPATH/etc/{config.key}.php. This module is for internal system php fit framework usage only. Nothing to do here for app developer.

This module is executed for every after package install or update.

Installation

composer require phpfit/config-builder

Usage

Add an extra key on your package composer.json file to target the package config file location:

{
    "...": "...",
    "extra": {
        "phpfit": {
            "config": "etc/config.php"
        }
    },
    "...": "..."
}

Extra name should be phpfit.config to be identified.

Config Strucutre

Add config file on etc/config.php and put package config as array. The top array key will be used as config file name, and array value as config value after combining them with exists config file.

return [
    'db' => [
        'host' => 'localhost'
    ]
];

Above package config will create or modify exists app config named etc/config/db.php and combine the value of exists app config with provided package config. The final result of the config on etc/config/db.php will be as below:

<?php

return [
    'host' => 'localhost'
];

License

The phpfit/config-builder library is licensed under the MIT license. See License File for more information.

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-22