L
L
linker2013-12-21 03:02:28
PHP
linker, 2013-12-21 03:02:28

Is it possible to upload additional files via composer besides the main package?

I want to automatically install through composer not only the package distribution, but also additional files needed by the package. For example - dictionaries for phpmorphy.
Something like this, so that the package is downloaded, followed by dictionaries, which would ideally also be unpacked (script: post-install-cmd/post-update-cmd?):

"require": {
        "heromantor/phpmorphy": "dev-master"
    },
    "repositories":[
        {
            "type":"package",
            "package": {
                "name":"heromantor/phpmorphy",
                "version":"master",
                "source":{
                    "url":"https://github.com/heromantor/phpmorphy.git",
                    "type":"git",
                    "reference": "master"
                },
                "dist":{
                    "url":"http://downloads.sourceforge.net/project/phpmorphy/phpmorphy-dictionaries/0.3.x/ru_RU/morphy-0.3.x-ru_RU-withjo-utf-8.zip",
                    "type":"zip"
                }
            }
        }

Is there such a thing or carry a feature request to the composer?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
return, 2013-12-22
@linker

Composer is just a package manager, but you can write plugins for it . For example, this one - https://github.com/thecodingmachine/archive-installer
Or you can use a hook on some event, as you wanted.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question