Drupal 11 compatibility

Created on 7 June 2024, 6 months ago

Problem/Motivation

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇺🇸United States jrglasgow Idaho

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @jrglasgow
  • Merge request !23Issue #3453307: Drupal 11 compatibility → (Open) created by jrglasgow
  • Status changed to Needs review 6 months ago
  • 🇺🇸United States jrglasgow Idaho

    Here is a merge request that does the basics... I haven't had a chance to do any testing yet

  • First commit to issue fork.
  • 🇺🇸United States scott_earnest

    Error on admin configuration screen (/admin/config/system/siteimprove)
    ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /app/web/modules/contrib/siteimprove/src/Form/SettingsForm.php on line 79 and exactly 2 expected in Drupal\Core\Form\ConfigFormBase->__construct() (line 43 of core/lib/Drupal/Core/Form/ConfigFormBase.php).

    Per change record, ConfigFormBase now expects 2nd parameter for TypedConfigManagerInterface
    - https://www.drupal.org/node/3404140

    Above commit adds this new field.

  • 🇫🇮Finland sokru

    I'd recommend merging 📌 Add Gitlab CI to siteimprove module Active first, so we get extra assurance the this module is compatible with Drupal 11. So the now failing job "phpstan (next major)", should pass.

  • 🇺🇸United States wsantell

    Running this module with the patch for 75f038cc causes this error:
    PHP Fatal error: Type of Drupal\siteimprove\Form\SettingsForm::$typedConfigManager must not be defined (as in class Drupal\Core\Form\ConfigFormBase) in /var/www/html/docroot/modules/contrib/siteimprove/src/Form/SettingsForm.php on line 0

    In short, $typedConfigManager is defined in ConfigFormBase and does not need to be replicated in the form which is extending it.

    It doesn't look like I'm allowed to edit the SettingsForm file to make a new commit. Deleting these lines (76-82) in the patched file resolves the error:

      /**
       * Typed Config Service.
       *
       * @var \Drupal\Core\Config\TypedConfigManagerInterface
       */
      protected TypedConfigManagerInterface $typedConfigManager;
    
    
  • 🇺🇸United States scott_earnest

    @wsantell - thank you for your update. This did not throw an error for me locally, but it makes sense what you are saying so I took it out.

    I was testing with:
    - Drupal 11.0.9
    - SiteImprove 2.0.2
    - PHP 8.3.13

    Could you share what you are using?

    Also, do you see green "Get push access" button next to the issue fork link at the top of this issue? That should be all you need to get access.

    Appreciate the help!

Production build 0.71.5 2024