-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Drupal 8 (and I suspect other frameworks) uses https://github.com/composer/installers to relocate where the installed packages is placed.
The bad news is that composer basically allows composer plugins to mess with where packages are installed. The good news is that a large amount of frameworks uses composer/installers rather than their own custom one.
Sadly, composer doesn't note the installed path of a package in the lock file. That would have been too easy.
As I see it, what is needed is:
- Triggering on composer/installers being part of the dependencies.
- For each package discovered, check up on installer-paths to adjust its root path.
Each path can contain {$name}, {$vendor} and {$type}. Vendor can be taken from the package name, name is either taken from "installer-name" from the "extra" section of te packages composer.json, or the package name. Type is the "type" from the composer.json or "library"...
Each path points to an array of what to install there, which can be:
- A package name, ie.
"drupal/core" - A vendor:
"vendor:my_organization" - A package type:
"type:drupal-module"
A bit fiddly, but not too bad...
This is step one in getting Drupal 8 working. Of course a solution that just hooks into ede-php-autoload and adjusts things for Drupal is also a possibility, but supporting composer/installers gives support for many more frameworks.