Skip to content

Instantly share code, notes, and snippets.

@pendashteh
Created April 16, 2016 07:20
Show Gist options
  • Save pendashteh/716627d894f062b4f61dd17b84323fe0 to your computer and use it in GitHub Desktop.
Save pendashteh/716627d894f062b4f61dd17b84323fe0 to your computer and use it in GitHub Desktop.
Fix for Composer.php in Drupal 8 core when installing cforge distrobution
diff --git a/docroot/core/lib/Drupal/Core/Composer/Composer.php b/docroot/core/lib/Drupal/Core/Composer/Composer.php
index 0d5b6aa..b31741a 100644
--- a/docroot/core/lib/Drupal/Core/Composer/Composer.php
+++ b/docroot/core/lib/Drupal/Core/Composer/Composer.php
@@ -20,7 +20,7 @@
class Composer {
protected static $packageToCleanup = [
- 'behat/mink' => ['tests', 'driver-testsuite'],
+ 'behat/mink' => ['driver-testsuite'],
'behat/mink-browserkit-driver' => ['tests'],
'behat/mink-goutte-driver' => ['tests'],
'doctrine/cache' => ['tests'],
@@ -82,6 +82,7 @@ public static function preAutoloadDump(Event $event) {
$repository = $event->getComposer()->getRepositoryManager()->getLocalRepository();
// This is, essentially, a null constraint. We only care whether the package
// is present in vendor/ yet, but findPackage() requires it.
+ return;
$constraint = new Constraint('>', '');
// Check for our packages, and then optimize them if they're present.
if ($repository->findPackage('symfony/http-foundation', $constraint)) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment