I got an existing Drupal 8.2.x project with existing unit tests. When I run a sample unit test, I get the error (real module name redacted):
No schema for my_module.global
This doesn’t seem to be related to the my_module.schema.yml
file, or any DB schema that I can tell. Drilling down, I got this output for the $ definition
variable in \Drupal\Core\Config\TypedConfigManager.php
, which the unit test calls up (among others):
array ( 'label' => 'Undefined', 'class' => 'Drupal\Core\Config\Schema\Undefined', 'definition_class' => '\Drupal\Core\TypedData\DataDefinition', 'type' => 'undefined', )
For core modules the class is Drupal\Core\Config\Schema\Mapping
. Note that the error complains about a schema for my_module.global
, which is one of the YAML config files for this module (can’t tell how else it’s related).
The question is, what does this schema mean exactly, and where do I set it for my module?