humbug/box
Composer 安装命令:
composer require humbug/box
包简介
Fast, zero config application bundler with PHARs.
关键字:
README 文档
README
Upgrading from Box2? Checkout the upgrade guide!
Goal
The Box application simplifies the PHAR building process. Out of the box (no pun intended), the application can do many great things:
- ⚡ Fast application bundling
- 🔨 PHAR isolation
- ⚙️ Zero configuration by default
- 🚔 Requirements checker
- 🚨 Friendly error logging experience
- 🔍 Retrieve information about the PHAR extension or a PHAR file and its contents (
box infoorbox diff) - 🔐️ Verify the signature of an existing PHAR (
box verify) - 📝 Use Git tags and short commit hashes for versioning
- 🕵️️ Get recommendations and warnings about regarding your configuration (
box validate) - 🐳 Docker support (
box docker)
For the full documentation see https://box-project.github.io/box.
Table of Contents
- Installation
- Usage
- Configuration
- Base path (
base-path) - Main (
main) - Output (
output) - Permissions (
chmod) - Check requirements (
check-requirements) - Including files
- Stub
- Forcing the timestamp (
timestamp) - Dumping the Composer autoloader (
dump-autoload) - Compactors (
compactors) - Compression algorithm (
compression) - Security
- Metadata (
metadata) - Replaceable placeholders
- Replacements (
replacements) - Replacement sigil (
replacement-sigil) - Datetime placeholder (
datetime) - Datetime placeholder format (
datetime-format) - Pretty git commit placeholder (
git) - Git commit placeholder (
git-commit) - Short git commit placeholder (
git-commit-short) - Git tag placeholder (
git-tag) - Git version placeholder (
git-version)
- Replacements (
- Base path (
- Requirements checker
- Optimize your PHAR
- PHAR code isolation
- Docker support
- Symfony support
- Reproducible builds
- PHAR signing best practices
- FAQ
- Contributing
- Upgrade guide
- Backward Compatibility Promise (BCP)
- Credits
Usage
Creating a PHAR should be as simple as running box compile (no config required!). It will however assume some
defaults that you might want to change. Box will by default be looking in order for the files box.json and
box.json.dist in the current working directory. A basic configuration could be for example changing the PHAR
permissions:
{
"chmod": "0700"
}
You can then find more advanced configuration settings in the configuration documentation. For more information on which command or options is available, you can run:
box help
Contributing
The project provides a Makefile in which the most common commands have been registered such as fixing the coding
style or running the test.
make
Backward Compatibility Promise (BCP)
The policy is for the major part following the same as Symfony's one. Note that the code marked
as @private or @internal are excluded from the BCP.
The text displayed by the commands (e.g. compile or info) or the content of the error/exception messages are also not subject to the BCP.
Credits
Project originally created by: Kevin Herrera (@kherge) which has now been moved under the Humbug umbrella.
humbug/box 适用场景与选型建议
humbug/box 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 878.18k 次下载、GitHub Stars 达 1.31k, 最近一次更新时间为 2017 年 11 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「phar」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 humbug/box 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 humbug/box 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 humbug/box 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Extractor project for php
HiDev plugin for Box PHAR builder
Smart compressed files extractor
multiple small utils
Phar command line program development skeleton
Integrates Phar Update to Symfony Console.
统计信息
- 总下载量: 878.18k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1319
- 点击次数: 29
- 依赖项目数: 70
- 推荐数: 2
其他信息
- 授权协议: MIT
- 更新时间: 2017-11-12
