From 4de1e562ddb5fa2cdf83f59d213d9b4fa9cae8a4 Mon Sep 17 00:00:00 2001 From: Miro Michalicka Date: Mon, 15 Oct 2018 17:43:35 +0200 Subject: [PATCH] Add support for Drupal profiles living outside of d.o. --- src/Composer/Package.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Composer/Package.php b/src/Composer/Package.php index 4a8c0c567..4996a65b5 100644 --- a/src/Composer/Package.php +++ b/src/Composer/Package.php @@ -153,6 +153,7 @@ protected function buildProject(array $package) { case 'drupal-core': case 'drupal-theme': case 'drupal-module': + case 'drupal-profile': $info['type'] = substr($package['type'], 7); break; } @@ -212,6 +213,8 @@ protected function buildProject(array $package) { '$1.$2$3', $version ); + } + if (strpos($package['name'], 'drupal/') === 0) { unset($info['download']); } return $info; @@ -260,8 +263,7 @@ protected function isDrupalPackage(array $package) { 'drupal-profile', ]; return ( - strpos($package['name'], 'drupal/') === 0 && - in_array($package['type'], $package_types) + in_array($package['type'], $package_types) ); }