jinomial/fw-cli
最新稳定版本:v1.0.1
Composer 安装命令:
composer require jinomial/fw-cli
包简介
The command line interface for the FW framework.
README 文档
README
This is the command-line utility for the FW Ecosystem, acting as the core compiler that transforms declarative YAML into highly-optimized, strictly-typed PHP code.
Available Commands
When running php fw from your application root, the following commands are available:
build:api
- Purpose: Compiles
api/*.yamlfiles. - Output:
- Generates strict
readonly classDTOs for payloads. - Generates
*Handlerclasses with invoked methods. - Compiles
build/routes.phpas a static array for the Kernel.
- Generates strict
build:db
- Purpose: Compiles
database/schema.yaml. - Output:
- Generates strictly-typed native PHP
*Modelclasses (e.g.,UserModel). - Generates
*RepositoryInterfacecontracts. - Generates
Base*Repositoryclasses containing explicit parameter-bound SQL queries mapping to the DTOs, completely eliminating N+1 lazy loading.
- Generates strictly-typed native PHP
build:migrations
- Purpose: Compiles
database/schema.yamldiffs into SQL scripts. - Output:
- Drops raw
CREATE TABLE.sqlscripts intodatabase/migrations/.
- Drops raw
build:container
- Purpose: Compiles the Dependency Injection Container.
- Output:
- Reflects across your entire application and specifically bound
config/dependencies.phpfile. - Writes
build/container.php, a giganticswitch/casestatement of instantiated singletons to eliminate runtime reflection overhead.
- Reflects across your entire application and specifically bound
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-07