Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit

Permalink
Fixes #1915: Default site factory applications to PHP 5.6. (#1972)
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash authored Sep 7, 2017
1 parent 9f81157 commit 4ecd351
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions composer.required.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"require-dev": {
"cweagans/composer-patches": "^1.6.0",
"oomphinc/composer-installers-extender": "^1.1",
"behat/behat": "^3.0",
"behat/mink": "~1.7",
"behat/mink-selenium2-driver": "^1.3.1",
Expand Down
10 changes: 7 additions & 3 deletions src/Update/Updates.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Acquia\Blt\Annotations\Update;
use Acquia\Blt\Robo\Common\ArrayManipulator;
use function file_exists;

/**
* Defines scripted updates for specific version deltas of BLT.
Expand Down Expand Up @@ -378,14 +379,17 @@ public function update_8009003() {
}
}

unset($composer_json['require']['composer/installers']);
$composer_json['require']['oomphinc/composer-installers-extender'] = '^1.1';

$composer_json['extra']['installer-types'][] = 'bower-asset';
$composer_json['extra']['installer-types'][] = 'npm-asset';
$composer_json['extra']['installer-paths']['docroot/libraries/{$name}'][] = 'type:bower-asset';
$composer_json['extra']['installer-paths']['docroot/libraries/{$name}'][] = 'type:npm-asset';

$projectAcsfHooks = $this->updater->getRepoRoot() . '/factory-hooks';
$acsf_inited = file_exists($projectAcsfHooks);
if ($acsf_inited) {
$composer_json['config']['platform']['php'] = '5.6';
}

$this->updater->writeComposerJson($composer_json);
}
}

0 comments on commit 4ecd351

Please sign in to comment.