diff -u b/core/modules/config/src/ConfigSubscriber.php b/core/modules/config/src/ConfigSubscriber.php --- b/core/modules/config/src/ConfigSubscriber.php +++ b/core/modules/config/src/ConfigSubscriber.php @@ -7,34 +7,28 @@ namespace Drupal\config; -use Drupal\Core\Config\BatchConfigImporter; use Drupal\Core\Config\ConfigEvents; use Drupal\Core\Config\ConfigImporterEvent; use Drupal\Core\Config\ConfigImporterException; -use Drupal\Core\Config\StorageDispatcher; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Drupal\Core\Config\ConfigImportValidateEventSubscriberBase; + /** * Config subscriber. */ -class ConfigSubscriber implements EventSubscriberInterface { +class ConfigSubscriber extends ConfigImportValidateEventSubscriberBase { /** * Checks that the Configuration module is not being uninstalled. * * @param ConfigImporterEvent $event * The config import event. - * - * @throws \Drupal\Core\Config\ConfigImporterException - * Exception thrown if the Configuration module is being uninstalled. */ public function onConfigImporterValidate(ConfigImporterEvent $event) { $importer = $event->getConfigImporter(); - if ($importer instanceof BatchConfigImporter) { - $core_extension = $importer->getStorageComparer()->getSourceStorage()->read('core.extension'); - if (!isset($core_extension['module']['config'])) { - throw new ConfigImporterException(t('Can not uninstall the Configuration module as part of a configuration synchronization through the user interface.')); - } + $core_extension = $importer->getStorageComparer()->getSourceStorage()->read('core.extension'); + if (!isset($core_extension['module']['config'])) { + $importer->logError($this->t('Can not uninstall the Configuration module as part of a configuration synchronization through the user interface.')); } } only in patch2: unchanged: --- a/core/lib/Drupal/Core/Config/ConfigImporter.php +++ b/core/lib/Drupal/Core/Config/ConfigImporter.php @@ -540,6 +540,7 @@ public function initialize() { // We have extensions to process. if ($this->totalExtensionsToProcess > 0) { $sync_steps[] = 'processExtensions'; + $sync_steps[] = 'flush'; } $sync_steps[] = 'processConfigurations'; @@ -550,6 +551,20 @@ public function initialize() { } /** + * Flushes Drupal's caches. + */ + public function flush(array &$context) { + // Rebuild the container and flush Drupal's caches. If the container is not + // rebuilt first the entity types are not discovered correctly due to using + // an entity manager that has the incorrect container namespaces injected. + \Drupal::service('kernel')->rebuildContainer(TRUE); + drupal_flush_all_caches(); + $this->reInjectMe(); + $context['message'] = $this->t('Flushed all caches.'); + $context['finished'] = 1; + } + + /** * Processes extensions as a batch operation. * * @param array $context. only in patch2: unchanged: --- a/core/modules/migrate/src/Entity/Migration.php +++ b/core/modules/migrate/src/Entity/Migration.php @@ -79,6 +79,13 @@ class Migration extends ConfigEntityBase implements MigrationInterface, Requirem public $process; /** + * The configuration describing the load plugins. + * + * @var array + */ + public $load; + + /** * The cached process plugins. * * @var array @@ -339,18 +346,4 @@ public function checkRequirements() { return TRUE; } - /** - * {@inheritdoc} - */ - public function toArray() { - // @todo Remove once migration config entities have schema - // https://drupal.org/node/2183957. - $class_info = new \ReflectionClass($this); - foreach ($class_info->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) { - $name = $property->getName(); - $properties[$name] = $this->get($name); - } - return $properties; - } - } only in patch2: unchanged: --- a/core/modules/simpletest/src/Form/SimpletestResultsForm.php +++ b/core/modules/simpletest/src/Form/SimpletestResultsForm.php @@ -48,6 +48,12 @@ public static function create(ContainerInterface $container) { */ public function __construct(Connection $database) { $this->database = $database; + } + + /** + * Builds the status image map. + */ + protected function buildStatusImageMap() { // Initialize image mapping property. $image_pass = array( '#theme' => 'image', @@ -96,6 +102,7 @@ public function getFormId() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state, $test_id = NULL) { + $this->buildStatusImageMap(); // Make sure there are test results to display and a re-run is not being // performed. $results = array();