Skip to content

Commit 5364fbd

Browse files
Pass the entire Composer event to the downloadScaffold method.
1 parent df490fc commit 5364fbd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Handler.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function onPostCmdEvent(\Composer\Script\Event $event) {
8888
// Only install the scaffolding if drupal/core was installed,
8989
// AND there are no scaffolding files present.
9090
if (isset($this->drupalCorePackage)) {
91-
$this->downloadScaffold($event->isDevMode());
91+
$this->downloadScaffold($event);
9292
// Generate the autoload.php file after generating the scaffold files.
9393
$this->generateAutoload();
9494
}
@@ -97,18 +97,18 @@ public function onPostCmdEvent(\Composer\Script\Event $event) {
9797
/**
9898
* Downloads drupal scaffold files for the current process.
9999
*
100-
* @param bool $dev
101-
* TRUE if dev packages are installed. FALSE otherwise.
100+
* @param \Composer\Script\Event $event
101+
* The Composer event.
102102
*/
103-
public function downloadScaffold($dev = FALSE) {
103+
public function downloadScaffold($event) {
104104
$drupalCorePackage = $this->getDrupalCorePackage();
105105
$webroot = realpath($this->getWebRoot());
106106

107107
// Collect options, excludes, dev and settings files.
108108
$options = $this->getOptions();
109109
$includes = $this->getIncludes();
110110
// Check dev files if necessary.
111-
if ($dev) {
111+
if ($event->isDevMode()) {
112112
$includes = array_merge($includes, $this->getIncludesDev());
113113
}
114114
$files = array_diff($includes, $this->getExcludes());

src/Plugin.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function postCmd(\Composer\Script\Event $event) {
7474
*/
7575
public static function scaffold(\Composer\Script\Event $event) {
7676
$handler = new Handler($event->getComposer(), $event->getIO());
77-
$handler->downloadScaffold($event->isDevMode());
77+
$handler->downloadScaffold($event);
7878
// Generate the autoload.php file after generating the scaffold files.
7979
$handler->generateAutoload();
8080
}

0 commit comments

Comments
 (0)