Loading core/lib/Drupal/Core/Config/ConfigImporter.php +1 −1 Original line number Diff line number Diff line Loading @@ -507,7 +507,7 @@ public function import() { * Exception thrown if the $sync_step can not be called. */ public function doSyncStep($sync_step, &$context) { if (!is_array($sync_step) && method_exists($this, $sync_step)) { if (is_string($sync_step) && method_exists($this, $sync_step)) { \Drupal::service('config.installer')->setSyncing(TRUE); $this->$sync_step($context); } Loading core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -822,7 +822,7 @@ public function testInvalidStep() { public function testCustomStep() { $this->assertFalse(\Drupal::isConfigSyncing(), 'Before an import \Drupal::isConfigSyncing() returns FALSE'); $context = []; $this->configImporter()->doSyncStep([self::class, 'customStep'], $context); $this->configImporter()->doSyncStep(\Closure::fromCallable([self::class, 'customStep']), $context); $this->assertTrue($context['is_syncing'], 'Inside a custom step \Drupal::isConfigSyncing() returns TRUE'); $this->assertFalse(\Drupal::isConfigSyncing(), 'After an valid custom step \Drupal::isConfigSyncing() returns FALSE'); } Loading Loading
core/lib/Drupal/Core/Config/ConfigImporter.php +1 −1 Original line number Diff line number Diff line Loading @@ -507,7 +507,7 @@ public function import() { * Exception thrown if the $sync_step can not be called. */ public function doSyncStep($sync_step, &$context) { if (!is_array($sync_step) && method_exists($this, $sync_step)) { if (is_string($sync_step) && method_exists($this, $sync_step)) { \Drupal::service('config.installer')->setSyncing(TRUE); $this->$sync_step($context); } Loading
core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -822,7 +822,7 @@ public function testInvalidStep() { public function testCustomStep() { $this->assertFalse(\Drupal::isConfigSyncing(), 'Before an import \Drupal::isConfigSyncing() returns FALSE'); $context = []; $this->configImporter()->doSyncStep([self::class, 'customStep'], $context); $this->configImporter()->doSyncStep(\Closure::fromCallable([self::class, 'customStep']), $context); $this->assertTrue($context['is_syncing'], 'Inside a custom step \Drupal::isConfigSyncing() returns TRUE'); $this->assertFalse(\Drupal::isConfigSyncing(), 'After an valid custom step \Drupal::isConfigSyncing() returns FALSE'); } Loading