[meta] Drupal 10 compatiblity

Created on 9 March 2022, over 2 years ago
Updated 29 June 2023, over 1 year ago

Problem/Motivation

There are a lot of deprecations, according to PHPStorm we are talking about ~1500 detected deprecations, mostly test asserts, which are fairly easy to resolve but it is quite lot of work.

To keep it reviewable, we need to split it up. This is enough that we actually might want to do it per method, at least for the most common ones. however, this means that we should _not_ work on multiple of those issues at the same time, due to high conflict potential

Recommended steps and groups:

Exclusive steps, only start the next if the previous one is done:

  1. setUp void return, $modules definition and update all .info.yml files to require Drupal 9.2
    1. setUp void return - seems to have been fixed in #3221963: Fix Drupal 9 test fails
    2. #3270461: Tests $modules property should be declared protected
    3. #3270501: Bump minimum required Drupal version to 9.2
  2. assertEqual() (460 usages, argument order needs to be reviewed
    1. #3271301: assertEqual() and assertNotEqual() is deprecated and will be removed from Drupal 10
  3. drupalPostForm() (300 usages)
    1. #3271901: drupalPostForm() is deprecated and will be removed in Drupal 10
  4. assertText() (350 usages, but should be a single global search & replace)
    1. #3272563: assertText() and assertNoText() is deprecated and will be removed in Drupal 10
  5. Remaining assert methods (after all the above are done, most should be search & replace too)
    1. #3273183: assertRaw and assertNoRaw is deprecated and will be removed in Drupal 10
    2. #3273185: assertResponse is deprecated and will be removed in Drupal 10
    3. #3273187: assertLink and assertNoLink is deprecated and will be removed in Drupal 10
    4. #3273366: assertUrl is deprecated and will be removed in Drupal 10
    5. #3273368: assertFieldByName and assertNoFieldByName is deprecated and will be removed in Drupal 10
    6. #3273371: assertTitle is deprecated and will be removed in Drupal 10
    7. #3273166: Refactor remaining deprecated assert methods
  6. drupal_get_path() + file_create_url(), often used together, so makes sense to group. Requires Drupal 9.3.
    1. #3274495: Drupal 10 compatibility
  7. 📌 Add explicit accessCheck(TRUE/FALSE) to content entity queries Fixed

Then we can use this issue to mop up the reminders and test against D10. For that, our test dependencies will need to either be removed in a first step or be compatible too: metatag, paragraphs, pathauto, webform

If you want to help work on this, pick one of the topics, create an issue if there is none yet and if there is no other active one yet. If there is an active issue, check if you can help there.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.0

Component

Core

Created by

🇨🇭Switzerland berdir Switzerland

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇪🇸Spain google01

    In the latest versions, functions continue to appear in the code without explicit accessCheck(TRUE/FALSE) to content entity queries.

    For example in the function "tmgmt_entity_delete" in the code file "tmgmt.module". This case is really worrying because it causes errors in the removal of any content, leaving Drupal 10 websites completely inoperative.

  • 🇨🇭Switzerland berdir Switzerland

    There is no such function this module. You might be using patches that have not been updated.

  • 🇪🇸Spain google01

    Effectively the patch https://www.drupal.org/project/tmgmt/issues/2998143 Delete job item when corresponding entity is being deleted Needs review "Delete job item when corresponding entity is being deleted" is adding code without explicit accessCheck(TRUE/FALSE) to content entity queries.

    Thank you very much for the quick response!

Production build 0.71.5 2024