Automated Drupal 10 compatibility fixes

Created on 15 June 2022, over 2 years ago
Updated 7 September 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

Closed: outdated

Version

2.0

Component

Code

Live updates comments and jobs are added and updated live.
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.

  • First commit to issue fork.
  • @jonnyhocks opened merge request.
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom jonnyhocks

    I've created a fork and applied the changes in the automated patch in #2 and opened up an MR

  • Status changed to RTBC almost 2 years ago
  • ๐Ÿ‡ฌ๐Ÿ‡ทGreece bserem

    The changes in the patch file are solid, let's get this one committed.
    Personally I would be dropping support for D8

    The MR also adds a composer.json file. I am not sure whether this is of critical importance.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom SirClickALot Somerset

    Any chance of a D10 compatible release for this great little module - we need it!

  • First commit to issue fork.
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mralexho

    Took @bserem โ†’ 's suggestion and pushed the commits. Would like to see this get merged as well.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom ikit-claw

    Added as patch file for easy use.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia latha@dc

    nagalatha_gampa โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ธ๐Ÿ‡ฐSlovakia kaszarobert

    I tested the patch as this blocks D10 upgrade right now for us. It's working fine, RTBC+

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States thalemn

    Yes, let's get this done. Thanks.

  • ๐Ÿ‡ต๐Ÿ‡ฐPakistan hamza_niazi

    Patch for D10

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom MrDaleSmith

    Just for anybody whose update to D10 is blocked by this module, it might be worth checking the module's code: the module is basically one-line of code that is easily replicable if you have any custom modules or themes in use on your site to put it in and need to get to Drupal 10 quickly.

  • ๐Ÿ‡ธ๐Ÿ‡ฐSlovakia kaszarobert

    Or use the lenient plugin which tells composer that the module is compatible with '^8 || ^9 || ^10' instead of what is defined in the module code right now.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom ikit-claw

    I have pushed a fix to dev for D10 if you could test it thanks. Will do a full release once its confirmed to be fine.

  • First commit to issue fork.
  • @gisle opened merge request.
  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ณ๐Ÿ‡ดNorway gisle Norway

    The pushed fix adds the following:

    core_version_requirement: ">=8"

    Please note that the "core_version_requirement" key is not understood by versions prior to Drupal 8.8. I believe that if you want to add an unbounded core_version_requirement-key it should instead be this:

    core_version_requirement: >=8.8
  • ๐Ÿ‡ฎ๐Ÿ‡ชIreland markconroy

    the patch in #15 looks good to me, as it also adds a composer.json file, but I'd gladly accept the patch in #11 either.

    Can we get this merged and released soon please?

  • ๐Ÿ‡ณ๐Ÿ‡ดNorway gisle Norway

    Neither the patch in #11, nor the one in #15 looks good to me. As for #11, a composer.json file should not be added if the project has no third party dependencies.

  • ๐Ÿ‡ฎ๐Ÿ‡ชIreland markconroy

    The patch in #11 says "this module is only compatible with Drupal 9 an Drupal 10", it doesn't give any indication that it's compatible with Drupal 8.

    -core: 8.x
    -core_version_requirement: ^8 || ^9
    +core_version_requirement: ^9 || ^10
    

    Let's look towards getting that merged and release. We shouldn't have such a long running issue for a module that is only 1 line of code.

  • ๐Ÿ‡ณ๐Ÿ‡ดNorway gisle Norway

    You are right. My bad.

    The patch in #11 by ikit-claw is OK, and should be committed.

    However, I reviewed comment #18. This is also by ikit-claw, and this (wrong) fix is already committed. You can see it in the repo here:
    https://git.drupalcode.org/project/disable_html5_validation/-/blob/8.x-1...

    It wrongly claims compatibility with anything 8.0 and higher. I stupidly assumed that ikit-claw had committed his own patch #11, but what was committed was actually something else.

    I am perfectly OK with patch in #11 being committed. The status "Needs work" was based upon comment #18 and the line of code that was actually committed.

    It is confusing when the maintainer posts a patch for review, then goes ahead and commits something completely different. But I should have been more careful.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom ikit-claw

    Thanks Gisle & Mark I will bump it 9+ as we will be doing a new release.

  • Status changed to RTBC over 1 year ago
  • ๐Ÿ‡ณ๐Ÿ‡ดNorway gisle Norway

    I see that the just released 2.0.0 now has an open ended "core_version_requirement" >9.

    That's fine for Drupal 9 and 10, and will probably will not need updating for the future Drupal 11.

  • ๐Ÿ‡ธ๐Ÿ‡ฐSlovakia kaszarobert

    So then, can we close this issue as there is now a D10 compatible stable release?

  • ๐Ÿ‡ฎ๐Ÿ‡ชIreland markconroy

    I'd prefer if the core version requirement was ^9 || ^10. We can't be sure this will work for D11, D12, etc.

    In any case, >=9 is RTBC and committed and released, so good enough for me.

  • ๐Ÿ‡ธ๐Ÿ‡ฐSlovakia kaszarobert

    Well, while the form_alter() hook, and the current way of attribute changing in a form won't be deprecated in the future, the module will continue to work.

  • ๐Ÿ‡ณ๐Ÿ‡ดNorway gisle Norway

    The merits of an open constraint given as "core_version_requirement" is debated elsewhere, please see: ๐Ÿ“Œ Add a composer plugin that supports 'composer require-lenient' to support major version transitions Active , where the pros and cons of this (and other) approaches are neatly summarized in the issue summary.

  • Status changed to Closed: outdated over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ชIreland markconroy

    Cool. Let's close this so.

Production build 0.71.5 2024