Skip to content

Commit b11999e

Browse files
Pass the entire Composer event to the downloadScaffold method.
1 parent 41d5041 commit b11999e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Handler.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function onPostCmdEvent(\Composer\Script\Event $event) {
8989
// Only install the scaffolding if drupal/core was installed,
9090
// AND there are no scaffolding files present.
9191
if (isset($this->drupalCorePackage)) {
92-
$this->downloadScaffold($event->isDevMode());
92+
$this->downloadScaffold($event);
9393
// Generate the autoload.php file after generating the scaffold files.
9494
$this->generateAutoload();
9595
}
@@ -98,18 +98,18 @@ public function onPostCmdEvent(\Composer\Script\Event $event) {
9898
/**
9999
* Downloads drupal scaffold files for the current process.
100100
*
101-
* @param bool $dev
102-
* TRUE if dev packages are installed. FALSE otherwise.
101+
* @param \Composer\Script\Event $event
102+
* The Composer event.
103103
*/
104-
public function downloadScaffold($dev = FALSE) {
104+
public function downloadScaffold($event) {
105105
$drupalCorePackage = $this->getDrupalCorePackage();
106106
$webroot = realpath($this->getWebRoot());
107107

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

src/Plugin.php

Lines changed: 1 addition & 1 deletion
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)