Automated Drupal 10 compatibility fixes

Created on 15 June 2022, over 2 years ago
Updated 23 June 2023, over 1 year ago

Problem/Motivation

Hello project maintainers,

This is an automated issue to help make this module compatible with Drupal 10.

To read more about this effort by the Drupal Association, please read: The project update bot is being refreshed to support Drupal 10 readiness of contributed projects β†’

Patches will periodically be added to this issue that remove Drupal 10 deprecated API uses. To stop further patches from being posted, change the status to anything other than Active, Needs review, Needs work or Reviewed and tested by the community. Alternatively, you can remove the "ProjectUpdateBotD10" tag from the issue to stop the bot from posting updates.

The patches will be posted by the Project Update Bot β†’ official user account. This account will not receive any issue credit contributions for itself or any company.

Proposed resolution

You have a few options for how to use this issue:

  1. Accept automated patches until this issue is closed

    If this issue is left open (status of Active, Needs review, Needs work or Reviewed and tested by the community) and the "ProjectUpdateBotD10" tag is left on this issue, new patches will be posted periodically if new deprecation fixes are needed.

    As the Drupal Rector project improves and is able to fix more deprecated API uses, the patches posted here will cover more of the deprecated API uses in the module.

    Patches and/or merge requests posted by others are ignored by the bot, and general human interactions in the issue do not stop the bot from posting updates, so feel free to use this issue to refine bot patches. The bot will still post new patches then if there is a change in the new generated patch compared to the patch that the bot posted last. Those changes are then up to humans to integrate.

  2. Leave open but stop new automated patches.

    If you want to use this issue as a starting point to remove deprecated API uses but then don't want new automated patches, remove the "ProjectUpdateBotD10" tag from the issue and use it like any other issue (the status does not matter then). If you want to receive automated patches again, add back the "ProjectUpdateBotD10" tag.

  3. Close it and don't use it

    If the maintainers of this project don't find this issue useful, they can close this issue (any status besides Active, Needs review, Needs work and Reviewed and tested by the community) and no more automated patches will be posted here.

    If the issue is reopened, then new automated patches will be posted.

    If you are using another issue(s) to work on Drupal 10 compatibility it would be very useful to other contributors to add those issues as "Related issues" when closing this issue.

Remaining tasks

Using the patches

  1. Apply the latest patch in the comments by Project Update Bot β†’ or human contributors that made it better.
  2. Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.
  3. Provide feedback about how the testing went. If you can improve the patch, post an updated patch here.

Providing feedback

If there are problems with one of the patches posted by the Project Update Bot β†’ , such as it does not correctly replace a deprecation, you can file an issue in the Drupal Rector issue queue β†’ . For other issues with the bot, for instance if the issue summary created by the bot is unclear, use the Project analysis issue queue β†’ .

πŸ“Œ Task
Status

Needs review

Version

4.0

Component

Code

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

Merge Requests

Comments & Activities

Not all content is available!

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

  • Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update over 1 year ago
    Waiting for branch to pass
  • This is an automated patch generated by Drupal Rector. Please see the issue summary for more details.

    It is important that any automated tests available are run with this patch and that you manually test this patch.

    Drupal 10 Compatibility

    According to the Upgrade Status module β†’ , even with this patch, this module is not yet compatible with Drupal 10.

    Currently Drupal Rector, version 0.15.1, cannot fix all Drupal 10 compatibility problems.

    Therefore this patch does not update the info.yml file for Drupal 10 compatibility.

    Leaving this issue open, even after committing the current patch, will allow the Project Update Bot β†’ to post additional Drupal 10 compatibility fixes as they become available in Drupal Rector.

    Debug info

    Bot run #12554

    This patch was created using these packages:

    1. mglaman/phpstan-drupal: 1.1.35
    2. palantirnet/drupal-rector: 0.15.1
  • First commit to issue fork.
  • Merge request !3Drupal 10 compatibility fixes β†’ (Open) created by rpayanm
  • Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update about 1 year ago
    Waiting for branch to pass
  • Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update about 1 year ago
    Waiting for branch to pass
  • πŸ‡ΊπŸ‡ΎUruguay rpayanm

    Please review.

  • Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update about 1 year ago
    Waiting for branch to pass
  • First commit to issue fork.
  • Pipeline finished with Failed
    10 months ago
    Total: 147s
    #88149
  • Pipeline finished with Failed
    10 months ago
    Total: 147s
    #88153
  • Pipeline finished with Failed
    10 months ago
    Total: 168s
    #88172
  • Pipeline finished with Failed
    10 months ago
    Total: 45s
    #88188
  • Pipeline finished with Failed
    10 months ago
    Total: 188s
    #88191
  • Pipeline finished with Failed
    10 months ago
    Total: 223s
    #88225
  • Pipeline finished with Failed
    10 months ago
    Total: 180s
    #88285
  • Pipeline finished with Success
    10 months ago
    Total: 188s
    #88337
  • πŸ‡¬πŸ‡§United Kingdom somersoft

    Just PHPCS and PHPSTAN failing on GitLab CI
    Example json to add the diff link to composer(.patches).json

    "patches": {
        "drupal/certificate": {
            "Automated Drupal 10 compatibility fixes - https://www.drupal.org/project/certificate/issues/3414060": "https://git.drupalcode.org/project/certificate/-/merge_requests/3.diff"
        }
    }
    
  • Pipeline finished with Failed
    10 months ago
    Total: 263s
    #88687
  • Pipeline finished with Success
    10 months ago
    Total: 191s
    #88749
  • Pipeline finished with Success
    10 months ago
    Total: 174s
    #100463
  • Pipeline finished with Success
    10 months ago
    Total: 156s
    #100491
  • Pipeline finished with Success
    10 months ago
    Total: 158s
    #100548
  • Pipeline finished with Success
    10 months ago
    Total: 158s
    #100561
  • πŸ‡¬πŸ‡§United Kingdom somersoft

    There is now a check to see if a certificate is published when generating the list of valid certificates.

    The following is from composer.json and shows the commit the patch can be applied to. It is currently the last commit to 4.x branch.

        require: {
            "drupal/certificate": "dev-4.x#<strong>eba7efb019fb9d6bf4566304b1d61043bb491dc3</strong>"
        }
    

    https://git.drupalcode.org/project/certificate/-/commit/eba7efb019fb9d6bf4566304b1d61043bb491dc3
    updated at February 2, 2023 at 5:38:41 PM GMT .

    All three commits, up to 1ba851f74ca1f541d7bcc6ba2d7b08d96bcd748d, on the 4.0.x branch are also present in this branch.

  • Pipeline finished with Failed
    10 months ago
    Total: 44s
    #100670
  • Pipeline finished with Success
    10 months ago
    Total: 154s
    #100680
  • Pipeline finished with Success
    10 months ago
    Total: 159s
    #100685
  • Pipeline finished with Success
    10 months ago
    Total: 188s
    #100691
  • πŸ‡¬πŸ‡§United Kingdom somersoft

    Add the related Course Credit issue to give visibility on the D10 status of that project/package that provides a class for this project/package.

  • First commit to issue fork.
  • Pipeline finished with Success
    9 months ago
    Total: 179s
    #124572
  • πŸ‡ΊπŸ‡ΈUnited States earthday47 New York

    Thanks for all the work on this! On a site with MR 3 applied I am getting an error from CertificateMappingsInlineEntityForm for the createInstance declaration. The injected services don't match up.

    Instead of adding all of EntityInlineForm's injected services, I switched to the webform style of calling parent::createInstance to prevent having to modify this later. Pushed a commit.

  • Pipeline finished with Failed
    8 months ago
    Total: 193s
    #144218
  • Pipeline finished with Success
    8 months ago
    Total: 246s
    #144235
  • πŸ‡¬πŸ‡§United Kingdom somersoft

    Due to changes to code in the source branch, this is one way of using these changes in composer.json

        "repositories": [
            {
                "type": "git",
                "url": "https://git.drupalcode.org/issue/certificate-3286439.git"
            },
        ],
        "require": {
            "drupal/certificate": "dev-3286439-drupal-10",
        }
    

    and no patching configuration.

Production build 0.71.5 2024