composer / getcomposer.org

getcomposer.org sources

Home Page:http://getcomposer.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to make references from packages.json to composer.json ?

matjung opened this issue · comments

Hello Getcomposer Authors and Community

Based on the documentation, the marker @composer.json gets replaced with its content.

https://getcomposer.org/doc/05-repositories.md#packages
Extract from documentation:
packages#
The only required field is packages. The JSON structure is as follows:

{
    "packages": {
        "vendor/package-name": {
            "dev-master": { @composer.json },
            "1.0.x-dev": { @composer.json },
            "0.0.1": { @composer.json },
            "1.0.0": { @composer.json }
        }
    }
}

The @composer.json marker would be the contents of the composer.json

Would it also be possible to make a url or path reference to the composer.json file?
e.g.
"1.0.0": "/path/to/composer.json" or
"1.0.0": "http://localhost/path/to/composer.json"

You cannot do that, this is only an indication in the docs that you should replace @composer.json by what the contents of composer.json would be. There are no includes supported. Rather use a repo of type path if you are trying to include existing packages which are available on disk.