Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By drunken monkey on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.6.x
Introduced in version:
8.6.0
Issue links:
Description:
It was previously possible to use config entities imported from files in tests, where the filename doesn't match the contained entity's ID.
Since this can lead to subtle bugs, the ConfigInstaller
class will now check whether the filename matches the entity ID and issues a warning otherwise (which will usually result in a test fail). In such a case, update either the filename or the ID in the file to be consistent.
Impacts:
Module developers
Comments
Notes
1. Generally the config id must match the part of config filename after the second dot, for example:
filename: core.entity_view_display.node.blog.default.yml
id: node.blog.default
2. If the given config works for you, but you see the "configuration name ... does not match the ID" error, then you should change the config filename (in /config/install directory), not the config id.