Update to Drupal 8.1.1. For more information, see https://www.drupal.org/node/2718713

This commit is contained in:
Pantheon Automation 2016-05-04 14:35:41 -07:00 committed by Greg Anderson
parent c0a0d5a94c
commit 9eae24d844
669 changed files with 3873 additions and 1553 deletions

View file

@ -469,7 +469,7 @@ class MigrateExecutable implements MigrateExecutableInterface {
if ($pct_memory > $threshold) {
$this->message->display(
$this->t('Memory usage is @usage (@pct% of limit @limit), reclaiming memory.',
array('@pct' => round($pct_memory*100),
array('@pct' => round($pct_memory * 100),
'@usage' => $this->formatSize($usage),
'@limit' => $this->formatSize($this->memoryLimit))),
'warning');
@ -480,7 +480,7 @@ class MigrateExecutable implements MigrateExecutableInterface {
if ($pct_memory > (0.90 * $threshold)) {
$this->message->display(
$this->t('Memory usage is now @usage (@pct% of limit @limit), not enough reclaimed, starting new batch',
array('@pct' => round($pct_memory*100),
array('@pct' => round($pct_memory * 100),
'@usage' => $this->formatSize($usage),
'@limit' => $this->formatSize($this->memoryLimit))),
'warning');
@ -489,7 +489,7 @@ class MigrateExecutable implements MigrateExecutableInterface {
else {
$this->message->display(
$this->t('Memory usage is now @usage (@pct% of limit @limit), reclaimed enough, continuing',
array('@pct' => round($pct_memory*100),
array('@pct' => round($pct_memory * 100),
'@usage' => $this->formatSize($usage),
'@limit' => $this->formatSize($this->memoryLimit))),
'warning');
@ -523,7 +523,7 @@ class MigrateExecutable implements MigrateExecutableInterface {
drupal_static_reset();
// Entity storage can blow up with caches so clear them out.
$manager = \Drupal::entityManager();
$manager = \Drupal::entityManager();
foreach ($manager->getDefinitions() as $id => $definition) {
$manager->getStorage($id)->resetCache();
}

View file

@ -416,7 +416,7 @@ class Migration extends PluginBase implements MigrationInterface, RequirementsIn
*/
public function getDestinationPlugin($stub_being_requested = FALSE) {
if ($stub_being_requested && !empty($this->destination['no_stub'])) {
throw new MigrateSkipRowException;
throw new MigrateSkipRowException();
}
if (!isset($this->destinationPlugin)) {
$this->destinationPlugin = $this->destinationPluginManager->createInstance($this->destination['plugin'], $this->destination, $this);

View file

@ -97,7 +97,7 @@ class MenuLinkParent extends ProcessPluginBase implements ContainerFactoryPlugin
}
}
}
throw new MigrateSkipRowException;
throw new MigrateSkipRowException();
}
}

View file

@ -35,7 +35,7 @@ class StaticMap extends ProcessPluginBase {
}
$new_value = NestedArray::getValue($this->configuration['map'], $new_value, $key_exists);
if (!$key_exists) {
if (isset($this->configuration['default_value'])) {
if (array_key_exists('default_value', $this->configuration)) {
if (!empty($this->configuration['bypass'])) {
throw new MigrateException('Setting both default_value and bypass is invalid.');
}

View file

@ -22,7 +22,7 @@ class DedupeEntityTest extends MigrateProcessTestCase {
/**
* The mock entity query factory.
*
* @var \Drupal\Core\Entity\Query\QueryFactory|\PHPUnit_Framework_MockObject_MockObject
* @var \Drupal\Core\Entity\Query\QueryFactory|\PHPUnit_Framework_MockObject_MockObject
*/
protected $entityQueryFactory;

View file

@ -65,6 +65,17 @@ class StaticMapTest extends MigrateProcessTestCase {
$this->assertSame($value, 'test');
}
/**
* Tests when the source is invalid but there's a default value of NULL.
*/
public function testMapWithInvalidSourceWithANullDefaultValue() {
$configuration['map']['foo']['bar'] = 'baz';
$configuration['default_value'] = NULL;
$this->plugin = new StaticMap($configuration, 'map', []);
$value = $this->plugin->transform(array('bar'), $this->migrateExecutable, $this->row, 'destinationproperty');
$this->assertNull($value);
}
/**
* Tests when the source is invalid and bypass is enabled.
*