Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes

This commit is contained in:
Pantheon Automation 2016-04-20 09:56:34 -07:00 committed by Greg Anderson
parent b11a755ba8
commit c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Composer\Composer.
*/
namespace Drupal\Core\Composer;
use Drupal\Component\PhpStorage\FileStorage;
@ -36,6 +31,7 @@ class Composer {
'jcalderonzumba/mink-phantomjs-driver' => ['tests'],
'masterminds/html5' => ['test'],
'mikey179/vfsStream' => ['src/test'],
'paragonie/random_compat' => ['tests'],
'phpdocumentor/reflection-docblock' => ['tests'],
'phpunit/php-code-coverage' => ['tests'],
'phpunit/php-timer' => ['tests'],
@ -65,7 +61,7 @@ class Composer {
'symfony/routing' => ['Tests'],
'symfony/serializer' => ['Tests'],
'symfony/translation' => ['Tests'],
'symfony/validator' => ['Tests'],
'symfony/validator' => ['Tests', 'Resources'],
'symfony/yaml' => ['Tests'],
'symfony-cmf/routing' => ['Test', 'Tests'],
'twig/twig' => ['doc', 'ext', 'test'],
@ -148,6 +144,7 @@ EOT;
*/
public static function vendorTestCodeCleanup(PackageEvent $event) {
$vendor_dir = $event->getComposer()->getConfig()->get('vendor-dir');
$io = $event->getIO();
$op = $event->getOperation();
if ($op->getJobType() == 'update') {
$package = $op->getTargetPackage();
@ -156,14 +153,39 @@ EOT;
$package = $op->getPackage();
}
$package_key = static::findPackageKey($package->getName());
$message = sprintf(" Processing <comment>%s</comment>", $package->getPrettyName());
if ($io->isVeryVerbose()) {
$io->write($message);
}
if ($package_key) {
foreach (static::$packageToCleanup[$package_key] as $path) {
$dir_to_remove = $vendor_dir . '/' . $package_key . '/' . $path;
$print_message = $io->isVeryVerbose();
if (is_dir($dir_to_remove)) {
if (!static::deleteRecursive($dir_to_remove)) {
throw new \RuntimeException(sprintf("Failure removing directory '%s' in package '%s'.", $path, $package->getPrettyName()));
if (static::deleteRecursive($dir_to_remove)) {
$message = sprintf(" <info>Removing directory '%s'</info>", $path);
}
else {
// Always display a message if this fails as it means something has
// gone wrong. Therefore the message has to include the package name
// as the first informational message might not exist.
$print_message = TRUE;
$message = sprintf(" <error>Failure removing directory '%s'</error> in package <comment>%s</comment>.", $path, $package->getPrettyName());
}
}
else {
// If the package has changed or the --prefer-dist version does not
// include the directory this is not an error.
$message = sprintf(" Directory '%s' does not exist", $path);
}
if ($print_message) {
$io->write($message);
}
}
if ($io->isVeryVerbose()) {
// Add a new line to separate this output from the next package.
$io->write("");
}
}
}