zendframework/zftool
最新稳定版本:v0.1.0
Composer 安装命令:
composer require zendframework/zftool
包简介
Utility module for Zend Framework 2 applications.
README 文档
README
Repository abandoned 2019-12-05
This repository is no longer maintained. Tooling was not updated to work with ZF3, and with the transition to Laminas, we will be deciding what, if any, new tooling we want to provide for the MVC framework.
ZFTool is an utility module for maintaining modular Zend Framework 2 applications. It runs from the command line and can be installed as ZF2 module or as PHAR (see below).
Features
- Class-map generator
- Listing of loaded modules
- Create a new project (install the ZF2 skeleton application)
- Create a new module
- Create a new controller
- Create a new action in a controller
- Application diagnostics
Requirements
- Zend Framework 2.0.0 or later.
- PHP 5.3.3 or later.
- Console access to the application being maintained (shell, command prompt)
Installation using Composer
- Open console (command prompt)
- Go to your application's directory.
- Run
composer require zendframework/zftool:dev-master - Execute the
vendor/bin/zf.phpas reported below
Using the PHAR file (zftool.phar)
- Download the zftool.phar from packages.zendframework.com
- Execute the
zftool.pharwith one of the options reported below (zftool.pharreplace thezf.php)
You can also generate the zftool.phar using the bin/create-phar command as reported below
Usage
Basic information
zf.php modules [list] show loaded modules
zf.php version | --version display current Zend Framework version
Diagnostics
zf.php diag [options] [module name]
[module name] (Optional) name of module to test
-v --verbose Display detailed information.
-b --break Stop testing on first failure.
-q --quiet Do not display any output unless an error occurs.
--debug Display raw debug info from tests.
Project creation
zf.php create project <path>
<path> The path of the project to be created
Module creation
zf.php create module <name> [<path>]
<name> The name of the module to be created
<path> The path to the root folder of the ZF2 application (optional)
Controller creation:
zf.php create controller <name> <module> [<path>]
<name> The name of the controller to be created
<module> The module in which the controller should be created
<path> The root path of a ZF2 application where to create the controller
Action creation:
zf.php create action <name> <controller> <module> [<path>]
<name> The name of the action to be created
<controller> The name of the controller in which the action should be created
<module> The module containing the controller
<path> The root path of a ZF2 application where to create the action
Application configuration
zf.php config list list all configuration option
zf.php config get <name> display a single config value, i.e. "config get db.host"
zf.php config set <name> <value> set a single config value (use only to change scalar values)
Classmap generator
zf.php classmap generate <directory> <classmap file> [--append|-a] [--overwrite|-w]
<directory> The directory to scan for PHP classes (use "." to use current directory)
<classmap file> File name for generated class map file or - for standard output. If not supplied, defaults to
autoload_classmap.php inside <directory>.
--append | -a Append to classmap file if it exists
--overwrite | -w Whether or not to overwrite existing classmap file
ZF library installation
zf.php install zf <path> [<version>]
<path> The directory where to install the ZF2 library
<version> The version to install, if not specified uses the last available
Compile the PHAR file
You can create a .phar file containing the ZFTool project. In order to compile ZFTool in a .phar file you need to execute the following command:
bin/create-phar
This command will create a zftool.phar file in the bin folder. You can use and ship only this file to execute all the ZFTool functionalities. After the zftool.phar creation, we suggest to add the folder bin of ZFTool in your PATH environment. In this way you can execute the zftool.phar script wherever you are, for instance executing the command:
mv zftool.phar /usr/local/bin/zftool.phar
Note: If the above fails due to permissions, run the mv line again with sudo.
Todo
- Module maintenance (installation, configuration, removal etc.) [installation DONE]
- Inspection of application configuration. [DONE]
- Deploying zf2 skeleton applications. [DONE]
- Reading and writing app configuration. [DONE]
zendframework/zftool 适用场景与选型建议
zendframework/zftool 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.44M 次下载、GitHub Stars 达 194, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「zf2」 「tool」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 zendframework/zftool 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 zendframework/zftool 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 zendframework/zftool 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
LosLog provides some log utility
Backend Google Sign On for Magento 2
EdpModuleLayouts is very simple Laminas module for making module-specific layouts insanely easy.
An app setting manager tool for laravel nova
Zend Framework module to leverage the symfony dependency injection container
RCM User HTML views/pages
统计信息
- 总下载量: 1.44M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 199
- 点击次数: 20
- 依赖项目数: 42
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 未知