ProductPromotion
Logo

PHP

made by https://0x3d.site

GitHub - box-project/box: ๐Ÿ“ฆ๐Ÿš€ Fast, zero config application bundler with PHARs.
๐Ÿ“ฆ๐Ÿš€ Fast, zero config application bundler with PHARs. - box-project/box
Visit Site

GitHub - box-project/box: ๐Ÿ“ฆ๐Ÿš€ Fast, zero config application bundler with PHARs.

GitHub - box-project/box: ๐Ÿ“ฆ๐Ÿš€ Fast, zero config application bundler with PHARs.

Package version Scrutinizer Code Quality Slack License

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 or box 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

  1. Installation
    1. Phive
    2. Composer
    3. Homebrew
    4. GitHub
    5. Docker
    6. shivammathur/setup-php (GitHub Actions)
  2. Usage
  3. Configuration
    1. Base path (base-path)
    2. Main (main)
    3. Output (output)
    4. Permissions (chmod)
    5. Check requirements (check-requirements)
    6. Including files
      1. Force auto-discovery (force-autodiscovery)
      2. Files (files and files-bin)
      3. Directories (directories and directories-bin)
      4. Finder (finder and finder-bin)
      5. Blacklist (blacklist)
      6. Excluding the Composer files (exclude-composer-files)
      7. Excluding dev files (exclude-dev-files)
      8. Map (map)
    7. Stub
      1. Stub (stub)
      2. Alias (alias)
      3. Shebang (shebang)
      4. Banner (banner)
      5. Banner file (banner-file)
    8. Forcing the timestamp (timestamp)
    9. Dumping the Composer autoloader (dump-autoload)
    10. Compactors (compactors)
      1. Annotations (annotations)
      2. PHP-Scoper (php-scoper)
    11. Compression algorithm (compression)
    12. Security
      1. Signing algorithm (algorithm)
      2. The private key (key)
      3. The private key password (key-pass)
    13. Metadata (metadata)
    14. Replaceable placeholders
      1. Replacements (replacements)
      2. Replacement sigil (replacement-sigil)
      3. Datetime placeholder (datetime)
      4. Datetime placeholder format (datetime-format)
      5. Pretty git commit placeholder (git)
      6. Git commit placeholder (git-commit)
      7. Short git commit placeholder (git-commit-short)
      8. Git tag placeholder (git-tag)
      9. Git version placeholder (git-version)
  4. Requirements checker
    1. Configuration
      1. PHP version requirements
      2. Extension configuration requirements
      3. Polyfills
    2. Integration with a custom stub
  5. Optimize your PHAR
    1. Review your files
    2. Compress your PHAR
    3. Optimize your code
  6. PHAR code isolation
    1. Why/Explanation
    2. Isolating the PHAR
    3. Debugging the scoping
  7. Docker support
  8. Symfony support
    1. Project files
    2. Project directory
    3. Cache
  9. Reproducible builds
    1. Creating a reproducible PHAR
      1. PHP-Scoper
      2. Composer
        1. Composer root version
        2. Composer autoload suffix
      3. Box
        1. PHAR alias
        2. Requirement Checker
        3. Box banner
      4. PHAR
    2. Usages
  10. PHAR signing best practices
    1. Built-in PHAR API
      1. How to sign your PHAR
      2. How it works
      3. Why it is bad
    2. How to (properly) sign your PHAR
      1. Create a new GPG-key
      2. Manually signing
      3. Generate the encryption key
      4. Secure your encryption key
      5. Sign your PHAR
      6. Verifying the PHAR signature
    3. Automatically sign in GitHub Actions
  11. FAQ
    1. What is the canonical way to write a CLI entry file?
      1. The shebang
      2. The PHP_SAPI check
      3. Autoloading Composer
    2. Detecting that you are inside a PHAR
    3. Building a PHAR with Box as a dependency
  12. Contributing
  13. Upgrade guide
  14. Backward Compatibility Promise (BCP)
  15. 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.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here ๐Ÿ”.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory