Skip to content
This repository has been archived by the owner on Sep 6, 2020. It is now read-only.

Composer

kherge edited this page Mar 21, 2013 · 7 revisions

These are configuration settings that can be used to build the Composer Phar, a popular dependency management application. To build Composer using Box:

  1. Clone the Composer repository: git clone https://github.com/composer/composer.git
  2. Install its dependencies: php composer.phar install
  3. Create the box.json configuration file in Using box.phar.
  4. Run Box build: php box.phar build

You will now have a file called composer.phar which should be identical in functionality, and nearly identical in file size (if not smaller) than the original Phar.

Using box.phar

{
    "alias": "composer.phar",
    "chmod": "0755",
    "directories": ["src"],
    "files": [
        "LICENSE",
        "res/composer-schema.json",
        "res/spdx-identifier.json"
    ],
    "finder": [
        {
            "name": "*.php",
            "exclude": ["Tests"],
            "in": "vendor"
        }
    ],
    "git-version": "package_version",
    "main": "bin/composer",
    "output": "composer.phar",
    "stub": true
}

Using kherge/box (Composer)

{
    "alias": "composer.phar",
    "chmod": "0755",
    "directories": ["src"],
    "files": [
        "LICENSE",
        "res/composer-schema.json",
        "res/spdx-identifier.json",
        "vendor/herrera-io/file-system-functions/src/lib/fs_functions.php",
        "vendor/herrera-io/json/src/lib/json_version.php",
        "vendor/herrera-io/phar-update/src/lib/constants.php"
    ],
    "finder": [
        {
            "name": "*.php",
            "exclude": [
                "herrera-io",
                "kherge",
                "phpseclib",
                "phpunit",
                "Tests",
                "yaml"
            ],
            "in": "vendor"
        }
    ],
    "git-version": "package_version",
    "main": "bin/composer",
    "output": "composer.phar",
    "stub": true
}
Clone this wiki locally