Issue #2295737 by Gábor Hojtsy, vijaycs85, alexpott: Fixed Not all shipped configuration passes validation even with all modules enabled.
parent
179c0920f5
commit
e25a1ec76b
|
|
@ -329,3 +329,13 @@ display_variant.plugin:
|
||||||
uuid:
|
uuid:
|
||||||
type: string
|
type: string
|
||||||
label: 'UUID'
|
label: 'UUID'
|
||||||
|
|
||||||
|
base_entity_reference_field_settings:
|
||||||
|
type: mapping
|
||||||
|
mapping:
|
||||||
|
target_type:
|
||||||
|
type: string
|
||||||
|
label: 'Type of item to reference'
|
||||||
|
target_bundle:
|
||||||
|
type: string
|
||||||
|
label: 'Bundle of item to reference'
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,11 @@ trait SchemaCheckTrait {
|
||||||
$error_key = $this->configName . ':' . $key;
|
$error_key = $this->configName . ':' . $key;
|
||||||
$element = $this->schema->get($key);
|
$element = $this->schema->get($key);
|
||||||
if ($element instanceof Undefined) {
|
if ($element instanceof Undefined) {
|
||||||
|
// @todo Temporary workaround for https://www.drupal.org/node/2224761.
|
||||||
|
$key_parts = explode('.', $key);
|
||||||
|
if (array_pop($key_parts) == 'translation_sync' && strpos($this->configName, 'field.') === 0) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
return array($error_key => 'Missing schema.');
|
return array($error_key => 'Missing schema.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@ use Drupal\system\Tests\Module\ModuleTestBase;
|
||||||
*/
|
*/
|
||||||
class ConfigImportAllTest extends ModuleTestBase {
|
class ConfigImportAllTest extends ModuleTestBase {
|
||||||
|
|
||||||
|
use SchemaCheckTestTrait;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The profile to install as a basis for testing.
|
* The profile to install as a basis for testing.
|
||||||
*
|
*
|
||||||
|
|
@ -118,5 +120,17 @@ class ConfigImportAllTest extends ModuleTestBase {
|
||||||
$this->container->get('config.manager')
|
$this->container->get('config.manager')
|
||||||
);
|
);
|
||||||
$this->assertIdentical($storage_comparer->createChangelist()->getChangelist(), $storage_comparer->getEmptyChangelist());
|
$this->assertIdentical($storage_comparer->createChangelist()->getChangelist(), $storage_comparer->getEmptyChangelist());
|
||||||
|
|
||||||
|
// Now we have all configuration imported, test all of them for schema
|
||||||
|
// conformance. Ensures all imported default configuration is valid when
|
||||||
|
// all modules are enabled.
|
||||||
|
$names = $this->container->get('config.storage')->listAll();
|
||||||
|
$factory = $this->container->get('config.factory');
|
||||||
|
/** @var \Drupal\Core\Config\TypedConfigManagerInterface $typed_config */
|
||||||
|
$typed_config = $this->container->get('config.typed');
|
||||||
|
foreach ($names as $name) {
|
||||||
|
$config = $factory->get($name);
|
||||||
|
$this->assertConfigSchema($typed_config, $name, $config->get());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
field.entity_reference.settings:
|
field.entity_reference.settings:
|
||||||
type: mapping
|
type: mapping
|
||||||
label: 'Settings'
|
label: 'Entity reference settings'
|
||||||
mapping:
|
mapping:
|
||||||
target_type:
|
target_type:
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ file.settings:
|
||||||
label: 'Directory'
|
label: 'Directory'
|
||||||
|
|
||||||
field.file.settings:
|
field.file.settings:
|
||||||
type: mapping
|
type: base_entity_reference_field_settings
|
||||||
label: 'File settings'
|
label: 'File settings'
|
||||||
mapping:
|
mapping:
|
||||||
display_field:
|
display_field:
|
||||||
|
|
@ -43,10 +43,12 @@ field.file.value:
|
||||||
- type: string
|
- type: string
|
||||||
label: 'Value'
|
label: 'Value'
|
||||||
|
|
||||||
field.file.instance_settings:
|
base_file_field_instance_settings:
|
||||||
type: mapping
|
type: mapping
|
||||||
label: 'File settings'
|
|
||||||
mapping:
|
mapping:
|
||||||
|
handler:
|
||||||
|
type: string
|
||||||
|
label: 'Reference method'
|
||||||
file_directory:
|
file_directory:
|
||||||
type: string
|
type: string
|
||||||
label: 'File directory'
|
label: 'File directory'
|
||||||
|
|
@ -56,6 +58,11 @@ field.file.instance_settings:
|
||||||
max_filesize:
|
max_filesize:
|
||||||
type: string
|
type: string
|
||||||
label: 'Maximum upload size'
|
label: 'Maximum upload size'
|
||||||
|
|
||||||
|
field.file.instance_settings:
|
||||||
|
type: base_file_field_instance_settings
|
||||||
|
label: 'File settings'
|
||||||
|
mapping:
|
||||||
description_field:
|
description_field:
|
||||||
type: boolean
|
type: boolean
|
||||||
label: 'Enable Description field'
|
label: 'Enable Description field'
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@ class FileItem extends EntityReferenceItem {
|
||||||
public static function defaultSettings() {
|
public static function defaultSettings() {
|
||||||
return array(
|
return array(
|
||||||
'target_type' => 'file',
|
'target_type' => 'file',
|
||||||
'display_field' => 0,
|
'display_field' => FALSE,
|
||||||
'display_default' => 0,
|
'display_default' => FALSE,
|
||||||
'uri_scheme' => file_default_scheme(),
|
'uri_scheme' => file_default_scheme(),
|
||||||
) + parent::defaultSettings();
|
) + parent::defaultSettings();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,29 +73,17 @@ image.settings:
|
||||||
label: 'Suppress the itok query string for image derivatives'
|
label: 'Suppress the itok query string for image derivatives'
|
||||||
|
|
||||||
field.image.settings:
|
field.image.settings:
|
||||||
type: mapping
|
type: field.file.settings
|
||||||
label: 'Image settings'
|
label: 'Image settings'
|
||||||
mapping:
|
mapping:
|
||||||
uri_scheme:
|
|
||||||
type: string
|
|
||||||
label: 'Upload destination'
|
|
||||||
default_image:
|
default_image:
|
||||||
type: field_default_image
|
type: field_default_image
|
||||||
label: 'Default value'
|
label: 'Default value'
|
||||||
|
|
||||||
field.image.instance_settings:
|
field.image.instance_settings:
|
||||||
type: mapping
|
type: base_file_field_instance_settings
|
||||||
label: 'Image settings'
|
label: 'Image settings'
|
||||||
mapping:
|
mapping:
|
||||||
file_directory:
|
|
||||||
type: string
|
|
||||||
label: 'Upload destination'
|
|
||||||
file_extensions:
|
|
||||||
type: string
|
|
||||||
label: 'Allowed file extensions'
|
|
||||||
max_filesize:
|
|
||||||
type: string
|
|
||||||
label: 'Maximum upload size'
|
|
||||||
max_resolution:
|
max_resolution:
|
||||||
type: string
|
type: string
|
||||||
label: 'Maximum image resolution'
|
label: 'Maximum image resolution'
|
||||||
|
|
|
||||||
|
|
@ -24,3 +24,6 @@ menu.entity.node.*:
|
||||||
sequence:
|
sequence:
|
||||||
- type: string
|
- type: string
|
||||||
label: 'Menu machine name'
|
label: 'Menu machine name'
|
||||||
|
parent:
|
||||||
|
type: string
|
||||||
|
label: 'Parent'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
id: d6_comment_entity_form_display_subject
|
id: d6_comment_entity_form_display_subject
|
||||||
label: Drupal 6 comment subject form display configuration
|
label: Drupal 6 comment subject form display configuration
|
||||||
|
migration_groups:
|
||||||
|
- Drupal 6
|
||||||
source:
|
source:
|
||||||
plugin: d6_comment_variable_per_comment_type
|
plugin: d6_comment_variable_per_comment_type
|
||||||
constants:
|
constants:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
# Schema for the configuration files of the Path module.
|
||||||
|
|
||||||
|
entity_form_display.field.path:
|
||||||
|
type: entity_field_form_display_base
|
||||||
|
label: 'Link format settings'
|
||||||
|
mapping:
|
||||||
|
settings:
|
||||||
|
type: sequence
|
||||||
|
|
@ -10,9 +10,3 @@ shortcut.set.*:
|
||||||
label:
|
label:
|
||||||
type: label
|
type: label
|
||||||
label: 'Label'
|
label: 'Label'
|
||||||
links:
|
|
||||||
type: sequence
|
|
||||||
label: 'Shortcuts'
|
|
||||||
sequence:
|
|
||||||
- type: string
|
|
||||||
label: 'Shortcut'
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ taxonomy.vocabulary.*:
|
||||||
label: 'Weight'
|
label: 'Weight'
|
||||||
|
|
||||||
field.taxonomy_term_reference.settings:
|
field.taxonomy_term_reference.settings:
|
||||||
type: mapping
|
type: base_entity_reference_field_settings
|
||||||
label: 'Taxonomy term reference settings'
|
label: 'Taxonomy term reference settings'
|
||||||
mapping:
|
mapping:
|
||||||
options_list_callback:
|
options_list_callback:
|
||||||
|
|
@ -56,11 +56,12 @@ field.taxonomy_term_reference.settings:
|
||||||
value: 'Parent'
|
value: 'Parent'
|
||||||
|
|
||||||
field.taxonomy_term_reference.instance_settings:
|
field.taxonomy_term_reference.instance_settings:
|
||||||
type: sequence
|
type: mapping
|
||||||
label: 'Taxonomy term reference settings'
|
label: 'Taxonomy term reference settings'
|
||||||
sequence:
|
mapping:
|
||||||
- type: string
|
handler:
|
||||||
label: 'Setting'
|
type: string
|
||||||
|
label: 'Reference method'
|
||||||
|
|
||||||
field.taxonomy_term_reference.value:
|
field.taxonomy_term_reference.value:
|
||||||
type: sequence
|
type: sequence
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue