drupal-composer / drupal-packagist

:package: Drupal Packagist server to automatically build package information from projects on drupal.org
http://packagist.drupal-composer.org
28 stars 4 forks source link

Remove drupal/drupal as a dependency #22

Closed cweagans closed 9 years ago

cweagans commented 9 years ago

We're using composer for a d8 project internally, and we're pulling in just the core directory through composer. This is so that we have full control over the contents of the webroot (and so that we can have our own autoload.php). As of now, if I try to pull in the d8 version of the focal_point module, composer tries to pull in drupal/drupal, and that's not the desired behavior.

Alternatively, do you have a different way that you can recommend to manage a d8 codebase with composer?

davidbarratt commented 9 years ago

drupal/core should really be the dependency now for D8. :/

cweagans commented 9 years ago

I 100% agree. Is there a clear path forward to change that? If you can get me pointed in the right direction, I have work time that I can spend on it.

derhasi commented 9 years ago

You can use "replace" in your composer.json to workaround that.

For the Drupal Packagist to change all dependencies to drupal/core we would need to adjust the dependency creation process in https://github.com/drupal-composer/drupal-parse-composer .

webflo commented 9 years ago

I talked with @tstoeckler about the dependency issue a few weeks ago. After a long discussion about the pros and cons we agreed to change the dependency to drupal/core for D8 Modules.

webflo commented 9 years ago

@cweagans Use use a custom package definition to override the default. Here is a working example: https://github.com/webflo/drupal-site-template/blob/metapackage-example/composer.json

webflo commented 9 years ago

@cweagans We need to change the logic in https://github.com/drupal-composer/drupal-parse-composer/blob/master/src/InfoFile.php#L170

webflo commented 9 years ago

Deployed the change a few days ago. New D8 Modules should show up with drupal/core.