decodelabs/fabric
Composer 安装命令:
composer require decodelabs/fabric
包简介
Lightweight PHP framework implementation using DecodeLabs ecosystem
README 文档
README
Lightweight PHP framework implementation using DecodeLabs ecosystem
Fabric provides the structures, prerequisites and conventions for building a web application using the DecodeLabs ecosystem.
Installation
This package requires PHP 8.4 or higher.
Install via Composer:
composer require decodelabs/fabric
Usage
A Fabric app looks very similar to a standard package with most code residing in the src folder, under a namespace of your choice and loaded via composer.
Bootstrapping
Fabric uses Genesis for bootstrapping your application. Add the DecodeLabs\Fabric\Genesis\Hub class to your composer.json file:
{
"extra": {
"genesis": {
"hub": "DecodeLabs\\Fabric\\Genesis\\Hub"
}
}
}
Then point your HTTP server to rewite to vendor/genesis.php as your entry point. Genesis takes care of the rest.
Config
Fabric utilises Dovetail for config loading - via a private .env file in the app root and data files in /config (though this can be customised if necessary).
The most important config file is the Environment.php file which defines some key values for the rest of the app to initialize with.
The appNamespace value will allow you to define the namespace in which the majority of your app code will reside, and which is already defined for loading in your composer file.
Kingdom
Coming soon
Structure
Fabric provides solid HTTP and CLI kernels that can handle requests in both contexts. Clip is used for CLI tasks, and Harvest for HTTP.
The HTTP kernel uses an extensible set of Middlewares to provide a flexible request handling pipeline. The default implementation is provided by Harvest and is a good starting point for most apps.
Greenleaf is used for routing and provides a simple, flexible and powerful routing system for HTTP Actions.
Licensing
Fabric is licensed under the MIT License. See LICENSE for the full license text.
decodelabs/fabric 适用场景与选型建议
decodelabs/fabric 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.42k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 11 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 decodelabs/fabric 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 decodelabs/fabric 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.42k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-11-27