humbug / box
Fast, zero config application bundler with PHARs.
Installs: 432 646
Dependents: 51
Suggesters: 1
Security: 0
Stars: 1 135
Watchers: 26
Forks: 100
Open Issues: 63
Requires
- php: ^8.2
- composer-plugin-api: ^2.2
- ext-iconv: *
- ext-mbstring: *
- ext-phar: *
- amphp/parallel: ^2.0
- composer/semver: ^3.3.2
- composer/xdebug-handler: ^3.0.3
- fidry/console: ^0.6.0
- fidry/filesystem: ^1.2.1
- humbug/php-scoper: ^0.18.6
- justinrainbow/json-schema: ^5.2.12
- nikic/iter: ^2.2
- phpdocumentor/reflection-docblock: ^5.4
- phpdocumentor/type-resolver: ^1.7
- psr/log: ^3.0
- sebastian/diff: ^5.0
- seld/jsonlint: ^1.10.2
- seld/phar-utils: ^1.2
- symfony/finder: ^6.4.0 || ^7.0.0
- symfony/polyfill-iconv: ^1.28
- symfony/polyfill-mbstring: ^1.28
- symfony/process: ^6.4.0 || ^7.0.0
- symfony/var-dumper: ^6.4.0 || ^7.0.0
- thecodingmachine/safe: ^2.5
- webmozart/assert: ^1.11
Requires (Dev)
- ext-xml: *
- bamarni/composer-bin-plugin: ^1.8.2
- ergebnis/composer-normalize: ^2.29
- fidry/makefile: ^1.0.1
- mikey179/vfsstream: ^1.6.11
- phpspec/prophecy: ^1.18
- phpspec/prophecy-phpunit: ^2.1.0
- phpunit/phpunit: ^10.5.2
- symfony/yaml: ^6.4.0 || ^7.0.0
Suggests
- ext-openssl: To accelerate private key generation.
Replaces
- dev-main / 4.x-dev
- 4.6.2
- 4.6.1
- 4.6.0
- 4.5.1
- 4.5.0
- 4.4.0
- 4.3.8
- 4.3.7
- 4.3.6
- 4.3.5
- 4.3.4
- 4.3.3
- 4.3.2
- 4.3.1
- 4.3.0
- 4.2.0
- 4.1.0
- 4.0.2
- 4.0.1
- 4.0.0
- 3.16.0
- 3.15.0
- 3.14.1
- 3.14.0
- 3.13.0
- 3.12.3
- 3.12.2
- 3.12.1
- 3.12.0
- 3.11.1
- 3.11.0
- 3.10.0
- 3.9.1
- 3.9.0
- 3.8.5
- 3.8.4
- 3.8.3
- 3.8.2
- 3.8.1
- 3.8.0
- 3.7.3
- 3.7.2
- 3.7.1
- 3.7.0
- 3.6.0
- 3.5.1
- 3.5.0
- 3.4.0
- 3.3.1
- 3.3.0
- 3.2.0
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.0
- 3.0.0-RC.0
- 3.0.0-beta.4
- 3.0.0-beta.3
- 3.0.0-beta.2
- 3.0.0-beta.1
- 3.0.0-beta.0
- 3.0.0-alpha.7
- 3.0.0-alpha.6
- 3.0.0-alpha.5
- 3.0.0-alpha.4
- 3.0.0-alpha.3
- 3.0.0-alpha.2
- 3.0.0-alpha.1
- 3.0.0-alpha.0
- 2.7.5
- 2.7.4
- 2.7.3
- 2.7.2
- 2.7.1
- 2.7.0
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.0
- 2.2.1
- 2.2.0
- 2.1.0
- 2.0.0
- 2.0.0-rc.2
- 2.0.0-rc.1
- 2.0.0-beta.2
- 2.0.0-beta.1
- 2.0.0-alpha.4
- 2.0.0-alpha.3
- 2.0.0-alpha.2
- 2.0.0-alpha.1
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 1.0.0-rc.4
- 1.0.0-rc.3
- 1.0.0-rc.2
- 1.0.0-rc.1
- 1.0.0-beta.4
- 1.0.0-beta.3
- 1.0.0-beta.2
- 1.0.0-beta.1.3
- 1.0.0-beta.1.2
- 1.0.0-beta.1.1
- 1.0.0-beta.1
- 1.0.0-alpha.7
- 1.0.0-alpha.6+build.1
- 1.0.0-alpha.5
- 1.0.0-alpha.4
- 1.0.0-alpha.3
- 1.0.0-alpha.2
- 1.0.0-alpha.1
- dev-dependabot/composer/requirement-checker/dependencies-0f40a087f9
- dev-dependabot/composer/dependencies-e5f88bca5b
- dev-dependabot/github_actions/dot-github/workflows/dependencies-56caa1194e
- dev-create-pull-request/patch-ps5guvg
- dev-create-pull-request/patch-l1tt543
- dev-create-pull-request/patch-cpjfs6p
- dev-create-pull-request/patch-2i2xj0s
- dev-create-pull-request/patch-2ojb483
- dev-create-pull-request/patch-trj4h70
- dev-create-pull-request/patch-tdnl394
- dev-create-pull-request/patch-e454knh
- dev-create-pull-request/patch-0b002rs
- dev-create-pull-request/patch-0z7jfy2
- dev-create-pull-request/patch-obef1ht
- dev-create-pull-request/patch-wfvnndg
- dev-create-pull-request/patch-qhqwuny
- dev-create-pull-request/patch-vicu8ag
- dev-create-pull-request/patch-x88ws4x
- dev-create-pull-request/patch-8x9yugw
- dev-create-pull-request/patch-2bttosk
- dev-create-pull-request/patch-231l4x4
- dev-create-pull-request/patch-tn1zjot
- dev-create-pull-request/patch-s4qo1jw
- dev-create-pull-request/patch-e3gkaon
- dev-create-pull-request/patch-hf6i21i
- dev-create-pull-request/patch-uwmrgsh
This package is auto-updated.
Last update: 2024-11-07 07:01:40 UTC
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 info
orbox 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.