Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add partial support for the generic "library" and "project" types #530

Open
EusebiuOprinoiu opened this issue Sep 28, 2023 · 0 comments
Open

Comments

@EusebiuOprinoiu
Copy link

EusebiuOprinoiu commented Sep 28, 2023

Composer Installers does not support custom locations for the generic library and project types.
From what I understand, this is an intentional choice because it provides way too much control, and a bad config could have unexpected consequences. (i.e. break the majority of composer projects)

Moving packages outside the vendor directory should be done responsibly.
That's why generic settings like in the snippet below should never be used.

"extra": {
    "installer-paths": {
        "custom-folder-one/{$name}/": [ "type:library", "type:project" ],
        "custom-folder-two/{$name}/":  [ "vendor:vendor-name" ]
    }
}

However, there are legitimate cases when specific packages need to be installed outside the vendor directory.
For these edge cases, it would be nice to have the option to do it, but only when done with intent.
That's why I propose you allow packages that have a generic type like library or project to be moved to custom locations, but only for rules that specify exact package names like in the example below.

"extra": {
    "installer-paths": {
        "custom-folder-one/{$name}/": [ "vendor-one/package-name" ],
        "custom-folder-two/{$name}/":  [ "vendor-two/package-name" ]
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant