greenhollowtech/ght-d-tools-bundle
Composer 安装命令:
composer require greenhollowtech/ght-d-tools-bundle
包简介
GHT D-Tools Bundle
README 文档
README
This bundle simplifies the running of common Symfony development commands using configurations for default options, and adds some other useful options and features.
Installation
Get the Composer package
For Symfony 5 and Up
Install with Composer by running composer require greenhollowtech/ght-d-tools-bundle.
For Symfony 4 and Below
Install d-tools version 2 with Composer by running composer require "greenhollowtech/ght-d-tools-bundle:2.*".
Add the GHTDevToolsBundle (if you have a Symfony 3 application)
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// your normal bundles ...
);
if (strpos($this->getEnvironment(), 'dev') !== false) {
$bundles = array_merge($bundles, array(
new GHT\DevToolsBundle\GHTDevToolsBundle(),
// other dev only bundles ...
));
}
return $bundles;
}
Configuration
Minimum Configuration
d_tools:
bundle: ExampleBundle
All Configuration Options
d_tools:
# The target bundle or directory
bundle: ExampleBundle
path: The bundle path when it cannot be guessed from the bundle
translations_path: The translations path when it cannot be guessed from the path
# The translation:update command, used by d:trans:refresh and d:trans:add
translation_update:
# If set, all other locales will not auto-generate new translation units
primary_locale: ~
# If both types of a conversion are true, defaults to the "as_char" conversion and the "as_entity" conversion is ignored
conversions:
# Should ampersand HTML entities be converted to characters
amp_as_char: false
# Should bare ampersands be converted to HTML entities (ignores ampersands in HTML entities)
amp_as_entity: false
# Should less than / greater than HTML entities be converted to characters
ltgt_as_char: false
# Should less than / greater than characters be converted to HTML entities
ltgt_as_entity: false
# Should non-breaking space HTML entities be converted to character
nbsp_as_char: false
# Should non-breaking space characters be converted to HTML entities
nbsp_as_entity: false
defaults:
# All the locales to be updated at once
locales: [ 'en' ]
# Override the default prefix
prefix: '__'
# If set, no prefix is added to the translations
no_prefix: false
# Override the default output format
output_format: 'xlf'
# Should the messages be dumped in the console or should the update be done
mode: 'force' # or 'dump-messages'
# Should backup be disabled
no_backup: false
# Should clean not found messages
clean: false
# Specify the domain to update
domain: ~
# The d:trans:add command
translation_add:
defaults:
# The translation domain
domain: 'messages'
# The translation locale
locale: 'en'
# The translation file format
file_format: 'xlf'
# Should the translation refresh be run after adding new translations
refresh: false
Usage
Refresh Translations
Translations are sorted alphabetically, CDATA wrapping happens, and missing translations trigger prompts given the set or default prefix.
bin/console d:trans:refresh
Add Translations
Just add translation tokens. Translation text will be prompted on the next refresh.
bin/console d:trans:add -t trans.one -t trans.two
Translation text can be set simultaneously.
bin/console d:trans:add -t trans.one:One -t trans.two:Two\ words -t "trans.three:This works too"
If the refresh is not configured as a default, translations for multiple languages can be added before the refresh happens.
bin/console d:trans:add -t trans.hello:Hola -l es
bin/console d:trans:add -t trans.hello:Shalom -l he
bin/console d:trans:add -t trans.hello:Hello --refresh
greenhollowtech/ght-d-tools-bundle 适用场景与选型建议
greenhollowtech/ght-d-tools-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.37k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 04 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「symfony」 「php」 「bundle」 「commands」 「utility」 「tools」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 greenhollowtech/ght-d-tools-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 greenhollowtech/ght-d-tools-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 greenhollowtech/ght-d-tools-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
2lenet/EasyAdminPlusBundle
The bundle for easy using json-rpc api on your project
Provide a way to secure accesses to all routes of an symfony application.
DMS Meetup API Bundle, enables Meetup API clients in services
Bundle Symfony DaplosBundle
Provides a Data Grid tables for your Symfony project.
统计信息
- 总下载量: 2.37k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Beerware
- 更新时间: 2017-04-04