-
Notifications
You must be signed in to change notification settings - Fork 931
Updated "composer/installers" version to support custom path modules #118
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
Conversation
I don't get why we need this nor where these new types are documented on drupal.org. Its already possible to override the install location for each package. You just have to add the package name and location before the generic path.
|
Thank you @webflo for your input, the new type is defined on composer/installers Many large sites have 20 - 25 custom modules, which should be pulled from a gitlab / github or any custom vcs location. so we allow them to simply use type instead of defining each module like, |
I think it's a reasonable shortcut, and miteshmap already got the change added to composer/installers |
Thanks @bojanz, Indeed it's a good shortcut. 👍 |
Does this means I have to create a separate repos for all my custom modules & themes and add |
1aeaa68
to
6b4023d
Compare
updating composer/installer to latest tag - v1.0.25
We went with |
Updated composer/installers in 7e329fa |
For the record - You can use Example:
|
I inherited a D8 project and 15 out of the 30 contrib modules don't have a composer.json with a "type": "drupal-module". I asked the entityqueue to add a composer.json and they agreed since the composer-installer types are well supported. I was about to reach out to other contrib modules to do the same. However, I decided to confirm that projects without a composer.json type end up in /vendor. That doesn't seem to be the case because I installed better_exposed_filters and it went to web/modules/contrib/. Is drupal-composer/drupal-project smart enough to move contrib packages out of /vendor and into web/modules/contrib/ even if they don't have a composer.json with a "type": "drupal-module"? |
I see the better_exposed_filters maintainer mentioned the Drupal Composer endpoint will create a composer.json for a module based its .info.yaml when one doesn't exist. I see composer.lock does define a "type": "drupal-module" for modules with no composer.json so I'm now assuming the endpoint is giving it that info and that it's not some drupal-composer/drupal-project magic. Hoping someone here can confirm if that's what's happening so I can better explain to the maintainers as I'm asking them to create a composer.json with a type: drupal-module. |
There's absolutely no need to create composer.json file on per-module basis. If composer.json is missing, d.o composer repository will figure out defaults from .info/.info.yml file. |
composer/installer latest tag is - v1.0.23 but updating it to master for this
composer/installers#269