You are here

class ConfigSchemaChecker in Drupal 8

Same name in this branch
  1. 8 core/lib/Drupal/Core/Config/Testing/ConfigSchemaChecker.php \Drupal\Core\Config\Testing\ConfigSchemaChecker
  2. 8 core/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php \Drupal\Core\Config\Development\ConfigSchemaChecker

Listens to the config save event and validates schema.

If tests have the $strictConfigSchema property set to TRUE this event listener will be added to the container and throw exceptions if configuration is invalid.

Hierarchy

Expanded class hierarchy of ConfigSchemaChecker

Deprecated

in drupal:8.3.0 and is removed from drupal:9.0.0. Use Drupal\Core\Config\Development\ConfigSchemaChecker.

See also

\Drupal\KernelTests\KernelTestBase::register()

\Drupal\simpletest\WebTestBase::setUp()

\Drupal\simpletest\KernelTestBase::containerBuild()

File

core/lib/Drupal/Core/Config/Testing/ConfigSchemaChecker.php, line 21

Namespace

Drupal\Core\Config\Testing
View source
class ConfigSchemaChecker extends SchemaChecker {

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigSchemaChecker::$checked protected property An array of config checked already. Keyed by config name and a checksum.
ConfigSchemaChecker::$exclude protected property An array of config object names that are excluded from schema checking.
ConfigSchemaChecker::$typedManager protected property The typed config manger.
ConfigSchemaChecker::getSubscribedEvents public static function Returns an array of event names this subscriber wants to listen to.
ConfigSchemaChecker::onConfigSave public function Checks that configuration complies with its schema on config save.
ConfigSchemaChecker::__construct public function Constructs the ConfigSchemaChecker object.
SchemaCheckTrait::$configName protected property The configuration object name under test.
SchemaCheckTrait::$schema protected property The config schema wrapper object for the configuration object under test.
SchemaCheckTrait::checkConfigSchema public function Checks the TypedConfigManager has a valid schema for the configuration.
SchemaCheckTrait::checkValue protected function Helper method to check data type.