Problem/Motivation
This problem occurs for plugin types with YAML discovery.
In Core, there is layout.
In contrib, at least the following modules have the problem in their plugin types:
- UI Styles
- UI Skins
- Layout Options
- UI Examples
- UI Patterns 1 made a workaround in https://git.drupalcode.org/project/ui_patterns/-/blob/8.x-1.x/modules/ui...
Steps to reproduce
Have two themes, one is a parent, the other is a child.
Ensure the machine name of the child is alphabetically before the machine name of the parent.
Declare a layout in the parent theme.
Override the layout in the child theme.
Result: the plugin is not overridden.
Proposed resolution
Remaining tasks
Found a solution.