Skip to content

Allow relative local directory for repositories of type composer #11519

@helhum

Description

@helhum

For a custom mono repo approach, I'm currently generating packages.json file in a local directory.
I would love to be able to specify the path to this repository relative to the root composer.json similar to repositories of type path:

{
    "repositories": [
        {
            "type": "composer",
            "url": "./path/to/local-dir/"
        }
    ]
}

Composer repositories though, only allow URLs. I could specify a file:// URL, but then the specified path needs to be an absolute file path:

{
    "repositories": [
        {
            "type": "composer",
            "url": "file:///absolute/path/to/local-dir/"
        }
    ]
}

Is there anything conceptually ore security wise that is a blocker to allow local relative file system paths for repositories of type Composer?

If not, I'm happy to create a PR to allow it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions