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 catch on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.1.x
Description:
The Drupal backwards compatibility policy has been refined several times since the release of 8.0.0. Changes allowable under the backwards compatibility policy may result in (usually small) updates required for modules to work with new minor releases of Drupal.
- Documentation has been added for areas of the code base which were previously not adequately included in the policy.
- The nature of changes allowed has been refined to try to balance ability to make progress with avoidance of breaking changes.
- The types of changes allowed in patch vs. minor releases has also been expanded and refined. For patch versions we will aim to avoid any breaking changes even to @internal code unless required to fix a serious bug, to reduce the risk of disruption for production sites.
- Additionally, documentation has been added for experimental modules, and the ways in which they are and are not covered by the backwards compatibility policy: https://www.drupal.org/core/experimental
Noteworthy specific updates:
- Methods may be added to classes and interfaces that are not explicitly tagged with
@api
in minor releases, so extending code should update in case of any name collisions. - Functions or methods with an underscore prefix (e.g.
_some_function()
) are considered internal, and may be used to avoid name collisions when backporting protected methods critical or major bug fixes. Extending code should not call these functions or methods directly nor use the underscore prefix for added methods. - Specific core themes (Bartik, Seven) are considered internal and may change, as is the markup and CSS that core outputs. The stable base themes (Stable, Classy) are considered public API, with stable templates, markup, and CSS, so themes needing BC support should extend one of those base themes.
For more details, review the full policy.
Note that the backward compatibility policy is still a draft. Module and theme developers are encouraged to test their code with the beta versions of minor releases to ensure that no unexpected API changes have been made other than those covered by the policy.
Impacts:
Module developers
Themers