Problem/Motivation

update_fix_compatibility() was deprecated in Drupal 8.8.4 and scheduled for removal in Drupal 9. Also, it is dangerous as calling it can break sites - see #2917600: update_fix_compatibility() puts sites into unrecoverable state

Proposed resolution

Remove the function.

Remaining tasks

Remove the function.

User interface changes

None

API changes

update_fix_compatibility() no longer exists.

Data model changes

None

Release notes snippet

The update_fix_compatibility() function has been removed, as it is no longer useful in Drupal 9 and can cause data corruption. Any calls to update_fix_compatibility() should be removed. See the change record for more information.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

swatichouhan012 created an issue. See original summary.

swatichouhan012’s picture

Assigned: swatichouhan012 » Unassigned
Status: Active » Needs review
FileSize
3.4 KB

Kindly review patch

Status: Needs review » Needs work

The last submitted patch, 2: 3123376-2.patch, failed testing. View results

swatichouhan012’s picture

Status: Needs work » Needs review
FileSize
3.75 KB
685 bytes

remove CompatibilityFixTest

dww’s picture

Component: update.module » database update system

This isn't about the Update Status / Manager (update.module) but is about the DB update system and update.php (database update system). Moving to the right component.

Meanwhile, not sure this is still allowed in beta. This might need to be moved to 9.1.x at this point.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

I think this is OK for 9.0.x as we did a proper deprecation and warned that it would be removed.

xjm’s picture

Title: Remove deprecated update_fix_compatibility from update.inc » Remove deprecated update_fix_compatibility() from update.inc
Priority: Normal » Major
Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs release note

Thanks for working on this.

So, normally we would require this to be a 10.0.0 deprecation at this point, since the beta1 deadline is a pretty strict deadline for any BC break in Drupal 9. The deprecation itself also was given an exception to the policy where it would otherwise have been required by 8.8.0-beta1 back in November (which is how we ended up missing it).

In the case of this particular issue, @catch and I discussed it and agreed to go ahead, because this function isn't just deprecated -- it's dangerous. So, I'm signing off on this issue being a beta target (which means, committable and a priority during the beta phase).

As a beta target and a BC break outside standard policy, it will need a release note. We can start from the release note from #2917600: update_fix_compatibility() puts sites into unrecoverable state (edit: fixed link) and link that issue's change record, with an explanation of why we're making this BC break outside policy.

Meanwhile, for any other case where there's a leftover deprecation in the codebase that refers to 9.0.0, we should instead patch it so that the deprecation references 10.0.0.

Thanks!

xjm’s picture

Title: Remove deprecated update_fix_compatibility() from update.inc » update_fix_incompatibility() is (theoretically) dead code, but not theoretically dangerous

Also using that issue's title since it explains why we're making the BC break (credit: @catch).

longwave’s picture

Title: update_fix_incompatibility() is (theoretically) dead code, but not theoretically dangerous » update_fix_incompatibility() is (theoretically) dead code, but is also theoretically dangerous
Issue summary: View changes
Status: Needs work » Needs review
Issue tags: -Needs release note

The "not" in the title didn't make sense to me, so I reworded it,

Added a release note snippet.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

In fact the patch was RTBC before and a release manager can review the release note snippet I think?

catch’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

Looks great to me but needs a re-roll.

johnwebdev’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
3.75 KB
catch’s picture

Status: Needs review » Reviewed & tested by the community

Re-roll looks good, back to RTBC, pending the bot.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed 668f597 and pushed to 9.1.x, cherry-picked to 9.0.x. Thanks!

catch’s picture

  • catch committed 668f597 on 9.1.x
    Issue #3123376 by swatichouhan012, johndevman, longwave, xjm:...

  • catch committed 56b9a31 on 9.0.x
    Issue #3123376 by swatichouhan012, johndevman, longwave, xjm:...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.