Installation

As a composer plugin, this library must be included as a direct dependency in a root (project) package.

"require": {
    // other libraries
    // ...
    "comodojo/comodojo-installer" : "^1.0"
}

Once installed, the plugin is immediately active and starts to scan the composer.json file looking for a custom configuration (in the extra section).

Following an example configuration in the composer.json.

"extra": {
    "comodojo-installer": {
        "package-types": [
            "comodojo-bundle"
        ],
        "global-config": {
            "extra-field": "comodojo-configuration",
            "persistence": "\\Comodojo\\Installer\\Persistence\\YamlPersistence",
            "params": {
                "config-file": "config/comodojo-configuration.yml",
                "depth": 6
            }
        },
        "package-extra": {
            "routes": {
                "driver": "\\Comodojo\\Installer\\Drivers\\RouteDriver",
                "persistence": "\\Comodojo\\Installer\\Persistence\\YamlPersistence",
                "params": {
                    "config-file": "config/comodojo-routes.yml"
                }
            }
        }
    }
}

See also

More details in general-configuration.

Requirements

To work properly, comodojo/comodojo-installer requires:

  • PHP >= 5.6.0
  • composer-plugin-api > 1.0