diff --git a/src/Handler.php b/src/Handler.php index 05d184e..4f9145e 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -59,7 +59,7 @@ class Handler { elseif ($operation instanceof UpdateOperation) { $package = $operation->getTargetPackage(); } - if (isset($package) && $package instanceof PackageInterface && $package->getName() == 'drupal/core') { + if (isset($package) && $package instanceof PackageInterface && $package->getName() == 'drupal/drupal') { return $package; } return NULL; @@ -85,7 +85,7 @@ class Handler { * @param \Composer\Script\Event $event */ public function onPostCmdEvent(\Composer\Script\Event $event) { - // Only install the scaffolding if drupal/core was installed, + // Only install the scaffolding if drupal/drupal was installed, // AND there are no scaffolding files present. if (isset($this->drupalCorePackage)) { $this->downloadScaffold(); @@ -223,7 +230,7 @@ EOF; */ public function getDrupalCorePackage() { if (!isset($this->drupalCorePackage)) { - $this->drupalCorePackage = $this->getPackage('drupal/core'); + $this->drupalCorePackage = $this->getPackage('drupal/drupal'); } return $this->drupalCorePackage; } diff --git a/tests/PluginTest.php b/tests/PluginTest.php index bb24cb2..65d77e8 100644 --- a/tests/PluginTest.php +++ b/tests/PluginTest.php @@ -78,7 +78,7 @@ class PluginTest extends \PHPUnit_Framework_TestCase { touch($exampleScaffoldFile); $mtime_touched = filemtime($exampleScaffoldFile); // Requiring a newer version triggers "composer update" - $this->composer('require drupal/core:"8.0.1"'); + $this->composer('require drupal/drupal:"8.0.1"'); clearstatcache(); $mtime_after = filemtime($exampleScaffoldFile); $this->assertNotEquals($mtime_after, $mtime_touched, 'Scaffold file was modified by composer update.'); @@ -129,7 +129,7 @@ class PluginTest extends \PHPUnit_Framework_TestCase { 'require' => array( 'drupal-composer/drupal-scaffold' => $this->tmpReleaseTag, 'composer/installers' => '^1.0.20', - 'drupal/core' => '8.0.0', + 'drupal/drupal' => '8.0.0', ), 'scripts' => array( 'drupal-scaffold' => 'DrupalComposer\\DrupalScaffold\\Plugin::scaffold'