class ConfigSchemaChecker in Drupal 8
Same name in this branch
- 8 core/lib/Drupal/Core/Config/Testing/ConfigSchemaChecker.php \Drupal\Core\Config\Testing\ConfigSchemaChecker
- 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
- class \Drupal\Core\Config\Development\ConfigSchemaChecker implements \Symfony\Component\EventDispatcher\EventSubscriberInterface uses SchemaCheckTrait
- class \Drupal\Core\Config\Testing\ConfigSchemaChecker
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\TestingView source
class ConfigSchemaChecker extends SchemaChecker {
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigSchemaChecker:: |
protected | property | An array of config checked already. Keyed by config name and a checksum. | |
ConfigSchemaChecker:: |
protected | property | An array of config object names that are excluded from schema checking. | |
ConfigSchemaChecker:: |
protected | property | The typed config manger. | |
ConfigSchemaChecker:: |
public static | function | Returns an array of event names this subscriber wants to listen to. | |
ConfigSchemaChecker:: |
public | function | Checks that configuration complies with its schema on config save. | |
ConfigSchemaChecker:: |
public | function | Constructs the ConfigSchemaChecker object. | |
SchemaCheckTrait:: |
protected | property | The configuration object name under test. | |
SchemaCheckTrait:: |
protected | property | The config schema wrapper object for the configuration object under test. | |
SchemaCheckTrait:: |
public | function | Checks the TypedConfigManager has a valid schema for the configuration. | |
SchemaCheckTrait:: |
protected | function | Helper method to check data type. |