Verified Commit 4a59d522 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3269140 by longwave: Remove deprecated config.storage.staging service

parent de4c1e82
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -343,9 +343,6 @@ services:
  config.storage.sync:
    class: Drupal\Core\Config\FileStorage
    factory: Drupal\Core\Config\FileStorageFactory::getSync
  config.storage.staging:
    alias: config.storage.sync
    deprecated: The "%alias_id%" service is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use the "config.storage.sync" service instead. See https://www.drupal.org/node/2574957
  config.storage.snapshot:
    class: Drupal\Core\Config\DatabaseStorage
    arguments: ['@database', config_snapshot]
+0 −27
Original line number Diff line number Diff line
<?php

namespace Drupal\KernelTests\Core\Config;

use Drupal\Core\Config\FileStorage;
use Drupal\KernelTests\KernelTestBase;

/**
 * Tests that the service "config.storage.staging" has been deprecated.
 *
 * @group Test
 * @group legacy
 */
class ConfigStorageStagingTest extends KernelTestBase {

  /**
   * Tests deprecation of the "config.storage.staging" service.
   */
  public function testConfigStorageStagingDeprecation() {
    $this->expectDeprecation('The "config.storage.staging" service is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use the "config.storage.sync" service instead. See https://www.drupal.org/node/2574957');
    // @phpstan-ignore-next-line
    $storage_staging = \Drupal::service('config.storage.staging');
    // Ensure at least one assertion.
    $this->assertInstanceOf(FileStorage::class, $storage_staging);
  }

}