Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions src/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ public function onPostCmdEvent(Event $event) {
* Downloads drupal scaffold files for the current process.
*/
public function downloadScaffold() {
$drupalCorePackage = $this->getDrupalCorePackage();
$webroot = realpath($this->getWebRoot());

// Collect options, excludes and settings files.
Expand All @@ -155,7 +154,22 @@ public function downloadScaffold() {
$dispatcher = new EventDispatcher($this->composer, $this->io);
$dispatcher->dispatch(self::PRE_DRUPAL_SCAFFOLD_CMD);

$version = $this->getDrupalCoreVersion($drupalCorePackage);
// First check for inline aliases. This allows a fork of drupal/core to be
// used, so that a require constraint of "8.6.1-patch1 as 8.6.1" will
// download the correct scaffolding files.
$aliases = $this->composer->getPackage()->getAliases();
$version = NULL;
foreach ($aliases as $alias) {
if ($alias['package'] == 'drupal/core') {
$version = $alias['alias'];
}
}

// No alias was found, so use the version from the package.
if (!$version) {
$drupalCorePackage = $this->getDrupalCorePackage();
$version = $this->getDrupalCoreVersion($drupalCorePackage);
}

$remoteFs = new RemoteFilesystem($this->io);

Expand Down