xiidea/easy-config 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

xiidea/easy-config

Composer 安装命令:

composer require xiidea/easy-config

包简介

A Symfony Bundle for easy configuration management

README 文档

README

Coverage Status Scrutinizer Code Quality Latest Stable Version Total Downloads License

A Symfony Bundle for easy configuration management.

Features Include

  • Group wise dynamic form creation ability
  • Store global configuration
  • Store user wise configuration
  • Get configuration through rest API

Install

  1. Download and Enable EasyConfigBundle
  2. Create Config entity class
  3. Configure yaml file
  4. Update database schema
  5. Create your first form
  6. Register the bundle’s routes
  7. Overriding default EasyConfigBundle templates (optional)

1. Download and Enable EasyConfigBundle :

Download through composer :

Open a command console, enter project directory and execute the following command to download the latest stable version of this bundle:

$ composer require xiidea/easy-config
Enable Bundle (No need when Flex is available):

The bundle should be automatically enabled by Symfony Flex. If you don't use Flex, you will need to enable the bundle manually by adding the following line in the config/bundles.php file of your project:

<?php
// src/Kernel.php

return [
    // ...
    Xiidea\EasyConfigBundle\XiideaEasyConfigBundle::class => ['all' => true],
];

2. Create Config entity class:

By default EasyConfigBundle supports Doctrine ORM. However, you must provide an Entity class and the class has to extend the class \Xiidea\EasyConfigBundle\Model\BaseConfig. To configure the Entity class properly please follow the detailed instructions.

3. Configure yaml file:

Create a file in the following directory config/packages with the exact name xiidea_easy_config.yaml A sample config file is available in this path Resources/config/config-sample.yml. Copy this sample file's content and paste to just created file. Do not forget to change your Entity class name which has been mentioned in Step 3.

# Xiidea Easy Config Configuration Sample

xiidea_easy_config:
    config_class: App\Entity\Configuration

4. Update database schema:

It’s time to set up the database schema, open your command console, go to your project root path and execute the following command.

$ php bin/console doctrine:schema:update --force

5. Create form group and type:

Create a form group class and form type with your necessary fields. Please follow the instructions to create the form group and type.

6. Register the bundle’s routes:

Now it's time to access the form you have just created, for that you have to include bundle's routes to your application by the following way.

xiidea_config_route:
    resource: "@XiideaEasyConfigBundle/Resources/config/routes.yaml"
    prefix: '/config'

Note: You may change the prefix as your wish

Following routes are available in this bundle:

  • Index route (prefix/) : List of all forms
  • Form group route (prefix/group_key) : Form of specific group key

7. Overriding default EasyConfigBundle templates (optional)

Template overriding is not important to use EasyConfigBundle bundle but if you want to keep UI as similar as your application you can override the template, to do so follow the instructions

Congratulations !

Your application is ready to store configurations, just browse the routes.

License

The Easy Config Bundle is licensed under the MIT license. See the LICENSE file for more details.

xiidea/easy-config 适用场景与选型建议

xiidea/easy-config 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 754 次下载、GitHub Stars 达 6, 最近一次更新时间为 2024 年 07 月 25 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「configuration」 「config」 「Settings」 「settings-bundle」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 xiidea/easy-config 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 xiidea/easy-config 我们能提供哪些服务?
定制开发 / 二次开发

基于 xiidea/easy-config 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 3
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-25