Unverified Commit 344d8422 authored by larowlan's avatar larowlan

Issue #2912387 by greg.1.anderson, Mile23, Mixologic, larowlan, jibran,...

Issue #2912387 by greg.1.anderson, Mile23, Mixologic, larowlan, jibran, alexpott, catch: Stop using wikimedia/composer-merge-plugin
parent 1bd7d872
......@@ -5,10 +5,24 @@
"license": "GPL-2.0-or-later",
"require": {
"composer/installers": "^1.0.24",
"wikimedia/composer-merge-plugin": "^1.4"
"wikimedia/composer-merge-plugin": "^1.4",
"drupal/core": "self.version"
},
"replace": {
"drupal/core": "^8.8"
"require-dev": {
"behat/mink": "1.7.x-dev",
"behat/mink-goutte-driver": "^1.2",
"behat/mink-selenium2-driver": "1.3.x-dev",
"composer/composer": "^1.8",
"drupal/coder": "^8.3.2",
"jcalderonzumba/gastonjs": "^1.0.2",
"jcalderonzumba/mink-phantomjs-driver": "^0.3.1",
"mikey179/vfsstream": "^1.2",
"phpunit/phpunit": "^6.5",
"phpspec/prophecy": "^1.7",
"symfony/css-selector": "^3.4.0",
"symfony/phpunit-bridge": "^3.4.3",
"symfony/debug": "^3.4.0",
"justinrainbow/json-schema": "^5.2"
},
"minimum-stability": "dev",
"prefer-stable": true,
......@@ -25,9 +39,6 @@
"https://www.drupal.org/node/2718229"
],
"merge-plugin": {
"include": [
"core/composer.json"
],
"recurse": true,
"replace": false,
"merge-extra": false
......@@ -48,6 +59,8 @@
}
},
"scripts": {
"pre-install-cmd": "Drupal\\Core\\Composer\\Composer::ensureComposerVersion",
"pre-update-cmd": "Drupal\\Core\\Composer\\Composer::ensureComposerVersion",
"pre-autoload-dump": "Drupal\\Core\\Composer\\Composer::preAutoloadDump",
"post-autoload-dump": "Drupal\\Core\\Composer\\Composer::ensureHtaccess",
"post-package-install": "Drupal\\Core\\Composer\\Composer::vendorTestCodeCleanup",
......@@ -59,6 +72,10 @@
{
"type": "composer",
"url": "https://packages.drupal.org/8"
},
{
"type": "path",
"url": "core"
}
]
}
This diff is collapsed.
......@@ -51,22 +51,6 @@
"conflict": {
"drush/drush": "<8.1.10"
},
"require-dev": {
"behat/mink": "1.7.x-dev",
"behat/mink-goutte-driver": "^1.2",
"behat/mink-selenium2-driver": "1.3.x-dev",
"composer/composer": "^1.8",
"drupal/coder": "^8.3.2",
"jcalderonzumba/gastonjs": "^1.0.2",
"jcalderonzumba/mink-phantomjs-driver": "^0.3.1",
"mikey179/vfsstream": "^1.2",
"phpunit/phpunit": "^6.5",
"phpspec/prophecy": "^1.7",
"symfony/css-selector": "^3.4.0",
"symfony/phpunit-bridge": "^3.4.3",
"symfony/debug": "^3.4.0",
"justinrainbow/json-schema": "^5.2"
},
"replace": {
"drupal/action": "self.version",
"drupal/aggregator": "self.version",
......@@ -110,7 +94,6 @@
"drupal/core-proxy-builder": "self.version",
"drupal/core-render": "self.version",
"drupal/core-serialization": "self.version",
"drupal/core-composer-scaffold": "self.version",
"drupal/core-transliteration": "self.version",
"drupal/core-utility": "self.version",
"drupal/core-uuid": "self.version",
......@@ -180,39 +163,6 @@
"drupal/workflows": "self.version",
"drupal/workspaces": "self.version"
},
"extra": {
"merge-plugin": {
"require": [
"core/lib/Drupal/Component/Annotation/composer.json",
"core/lib/Drupal/Component/Assertion/composer.json",
"core/lib/Drupal/Component/Bridge/composer.json",
"core/lib/Drupal/Component/ClassFinder/composer.json",
"core/lib/Drupal/Component/Datetime/composer.json",
"core/lib/Drupal/Component/DependencyInjection/composer.json",
"core/lib/Drupal/Component/Diff/composer.json",
"core/lib/Drupal/Component/Discovery/composer.json",
"core/lib/Drupal/Component/EventDispatcher/composer.json",
"core/lib/Drupal/Component/FileCache/composer.json",
"core/lib/Drupal/Component/FileSystem/composer.json",
"core/lib/Drupal/Component/Gettext/composer.json",
"core/lib/Drupal/Component/Graph/composer.json",
"core/lib/Drupal/Component/HttpFoundation/composer.json",
"core/lib/Drupal/Component/PhpStorage/composer.json",
"core/lib/Drupal/Component/Plugin/composer.json",
"core/lib/Drupal/Component/ProxyBuilder/composer.json",
"core/lib/Drupal/Component/Render/composer.json",
"core/lib/Drupal/Component/Serialization/composer.json",
"core/lib/Drupal/Component/Scaffold/composer.json",
"core/lib/Drupal/Component/Transliteration/composer.json",
"core/lib/Drupal/Component/Utility/composer.json",
"core/lib/Drupal/Component/Uuid/composer.json",
"core/lib/Drupal/Component/Version/composer.json"
],
"recurse": false,
"replace": false,
"merge-extra": false
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
......
......@@ -3,6 +3,8 @@
namespace Drupal\Core\Composer;
use Drupal\Component\PhpStorage\FileStorage;
use Composer\Semver\Comparator;
use Composer\Composer as ComposerApp;
use Composer\Script\Event;
use Composer\Installer\PackageEvent;
use Composer\Semver\Constraint\Constraint;
......@@ -94,6 +96,17 @@ class Composer {
'zendframework/zend-stdlib' => ['doc'],
];
/**
* Ensure that the minimum required version of Composer is running.
* Throw an exception if Composer is too old.
*/
public static function ensureComposerVersion() {
$composerVersion = ComposerApp::getVersion();
if (Comparator::lessThan($composerVersion, '1.9.0')) {
throw new \RuntimeException("Drupal core development requires Composer 1.9.0, but Composer $composerVersion is installed. Please run 'composer self-update'.");
}
}
/**
* Add vendor classes to Composer's static classmap.
*/
......
......@@ -10,13 +10,16 @@ const collectedFolders = {
Pages: [],
};
const searchDirectory = process.env.DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY || '';
const defaultIgnore = ['vendor/**'];
glob
.sync('**/tests/**/Nightwatch/**/*.js', {
cwd: path.resolve(process.cwd(), `../${searchDirectory}`),
ignore: process.env.DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES
? process.env.DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES.split(',')
: [],
? process.env.DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES.split(',').concat(
defaultIgnore,
)
: defaultIgnore,
})
.forEach(file => {
let m = regex.exec(file);
......
<?php
namespace Drupal\Tests\Core\Composer;
use Drupal\Core\Composer\Composer;
use Drupal\Tests\UnitTestCase;
/**
* @coversDefaultClass \Drupal\Core\Composer\Composer
* @group Composer
*/
class ComposerTest extends UnitTestCase {
/**
* Verify that Composer::ensureComposerVersion() doesn't break.
*
* @covers::ensureComposerVersion
*/
public function testEnsureComposerVersion() {
try {
$this->assertNull(Composer::ensureComposerVersion());
}
catch (\RuntimeException $e) {
$this->assertRegExp('/Drupal core development requires Composer 1.9.0, but Composer /', $e->getMessage());
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment