Problem/Motivation

Related to #3086261: [policy] Add proper deprecation notices in config entity presave bc layers which is now more for adding documentation.

Many hook_ENTITY_TYPE_presave() update helpers don't include a mechanism to issue deprecations when they're called outside hook_update_N(). This means that exported configuration in modules and tests constantly uses the hook_ENTITY_TYPE_presave() bc layer without deprecations being issued, which means if the maintainer doesn't remember to re-export it for a major release, it will start breaking in the next major version with no warning.

A current example is #3442395: ckeditor5 and editor module test config exports/stubs rely on hook_editor_presave() bc layers.

We could still add 10.x issues to add the @trigger_error() to the various methods that are missing it, however it might be too late for most module's 11.x compatibility, so they're likely to find out via brokenness rather than the deprecation message.

Proposed resolution

Remaining tasks

Find more examples. Also document this pattern properly at https://www.drupal.org/core/d8-bc-policy

User interface changes

API changes

Data model changes

Release notes snippet

Comments

catch created an issue. See original summary.

wim leers’s picture

catch’s picture

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

wim leers’s picture

Do we still intend to do this before 12.x?