rezozero/xilofone-plugin

There is no license information available for the latest version (1.1.0) of this package.

Maintainers

Package info

github.com/rezozero/xilofone-plugin

Type:composer-plugin

pkg:composer/rezozero/xilofone-plugin

Statistics

Installs: 3 571

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.1.0 2026-04-26 16:02 UTC

This package is auto-updated.

Last update: 2026-04-26 16:03:11 UTC


README

Fetch XLIFF translations files from xilofone.rezo-zero.com and update them in your PHP project.

Plugin will download translations files each time you run composer update. Or you can run it manually with:

composer xilofone:fetch-files

Install

composer require --dev rezozero/xilofone-plugin

This plugin requires a PSR-18 HTTP client and PSR-17 HTTP factory to be available in your project. If you don't already have one, install a compatible implementation such as:

composer require --dev symfony/http-client nyholm/psr7

Configuration

Add the following configuration in your composer.json file:

{
    "extra": {
        "xilofone": {
            "file_id": "30",
            "destination_folder": "translations"
        }
    },
    "config": {
        "allow-plugins": {
            "rezozero/xilofone-plugin": true
        }
    }
}

Then add your secret credentials in your project .env.local file:

XILOFONE_PLUGIN_USERNAME=username
XILOFONE_PLUGIN_PASSWORD=password

Multiple files

You can fetch multiple files by adding them in your composer.json file:

{
    "extra": {
        "xilofone": {
            "files": [
                {
                    "file_id": "30",
                    "destination_folder": "translations"
                },
                {
                    "file_id": "31",
                    "destination_folder": "translations"
                }
            ]
        }
    }
}

Development & testing

Install dependencies and run the test suite:

composer install
./vendor/bin/phpunit

Tests use a MockHttpClient stub (no real network required) and cover the model DTOs, the file provider, and the factory.

Custom host

By default the plugin connects to https://xilofone.rezo-zero.com. You can override this with a host key in composer.json:

{
    "extra": {
        "xilofone": {
            "host": "https://custom.xilofone.com",
            "file_id": "30",
            "destination_folder": "translations"
        }
    }
}

Or set the XILOFONE_PLUGIN_HOST environment variable, which takes precedence over the composer.json value:

XILOFONE_PLUGIN_HOST=https://custom.xilofone.com