Problem/Motivation
#2920682: Add config validation for plugin IDs added the PluginExists
constraint and used it in 2 places in config schema (see #2920682: Add config validation for plugin IDs):
block.block.*:plugin
editor.editor.*:editor
There are many more places in schema where we need to use this -- any place, really, where a plugin ID is mentioned in config. Right now, we're missing:
system.action*:plugin
condition.plugin:id
layout_builder.section:layout_id
field.field_settings.entity_reference:handler
field_config_base:field_type
field.storage.*.*:type
field_formatter:type
core.entity_form_display.*.*.*:content.*.type
filter:id
image.style.*:effects.*.id
system.mail:interface.*
media.type.*:source
rest.resource.*:plugin_id
search.page.*:plugin
tour.tip:plugin
views_display:access.type
views_area:plugin_id
views_argument:plugin_id
views_argument:default_argument_type
views_argument:validate.type
views_cache:type
views.view.*:display.*.display_plugin
views_display:exposed_form.type
All of these are addressed in this issue.
There are some plugin types which we can ignore in this issue, because they aren't used anywhere in config. Those are:
\Drupal\Core\Archiver\ArchiverInterface
\Drupal\ckeditor5\Plugin\CKEditor5PluginInterface
\Drupal\config_translation\ConfigMapperInterface
\Drupal\Core\Display\VariantInterface
\Drupal\Core\Render\Element\ElementInterface
\Drupal\help\HelpSectionPluginInterface
\Drupal\help\HelpTopicPluginInterface
\Drupal\language\LanguageNegotiationMethodInterface
\Drupal\layout_builder\SectionStorageInterface
\Drupal\Core\Http\LinkRelationTypeInterface
\Drupal\Core\Menu\ContextualLinkInterface
\Drupal\Core\Menu\MenuLinkInterface
\Drupal\Core\Menu\LocalActionInterface
\Drupal\Core\Menu\LocalTaskInterface
\Drupal\migrate\Plugin\MigrateDestinationInterface
\Drupal\migrate_drupal\Plugin\MigrateFieldInterface
\Drupal\migrate\Plugin\MigrateIdMapInterface
\Drupal\migrate\Plugin\MigrateProcessInterface
\Drupal\migrate\Plugin\MigrateSourceInterface
\Drupal\migrate\Plugin\MigrationInterface
\Drupal\Core\Queue\QueueWorkerInterface
plugin.manager.views.display_extender | |||
In patch | plugin.manager.views.field | ||
In patch | plugin.manager.views.filter | ||
N/A | plugin.manager.views.join | ||
In patch | plugin.manager.views.pager | ||
In patch | plugin.manager.views.query | views_display. | |
In patch | plugin.manager.views.relationship | views_relationship. | |
In patch | plugin.manager.views.row | views_display. | |
In patch | plugin.manager.views.sort | ||
In patch | plugin.manager.views.style | views_display. | |
N/A | plugin.manager.views.wizard | ||
In patch | plugin.manager.workflows.type | workflows.workflow.* | \Drupal\workflows\WorkflowTypeInterface |
Steps to reproduce
Proposed resolution
- Adopt it in all relevant places.
- Write test that verifies that all default config in Drupal core complies with the validation constraints, by adding a new
testValidity()
method to\Drupal\KernelTests\Core\Config\DefaultConfigTest