Skip to content

Dynamic path resolution based on project metadata #540

Open
@andrewnicols

Description

Hi,

I'm one of the core team working on https://github.com/moodle/moodle/.

I'm trying to improve our composer integrations in coming releases and I'd ideally like to make use of composer/installers to do so.

In Moodle we have maintain a list of all valid plugin types within our repository in a combination of {{components.json}} and {{subplugins.json}} files.

At the moment none of the installers here use a list sourced from the project itself, but I wonder if that is something you would be open to.

I've pushed a commit to my fork of this repo (andrewnicols@moodlePathFromJson) as a proof-of-concept.

https://github.com/andrewnicols/installers/blob/3a0d155d3532227bee73a751e3c96e16af0df610/src/Composer/Installers/MoodleInstaller.php#L81-L136

I haven't written unit tests for this yet.

Let me know if this kind of integration would be acceptable, or whether this would be best placed into a custom installer instead.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions