Drupal 10 compatibility

Created on 18 July 2022, over 2 years ago
Updated 3 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 โ†’

Periodically patches will be added to this issue that remove Drupal 10 deprecated API uses. To stop further patches from being posted simply close this issue (any status besides Active, Needs review or Needs work) or remove the "ProjectUpdateBotD10" tag from the issue.

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 or Needs work) 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.

  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 don't want new automated patches simply leave this issue open but remove the "ProjectUpdateBotD10" tag from the issue.

    You can use Drupal Rector yourself to make these patches.

    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 or Needs work) 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 may be useful to other contributors to add those issues as "Related issues" when closing this issue.

Remaining tasks

Using the patches

  1. Apply the patch in the comment by Project Update Bot โ†’ .
  2. Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.

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 Infrastructure project issue queue โ†’ using the component โ€œBot: Drupal Rectorโ€.

๐Ÿ“Œ Task
Status

Fixed

Version

1.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.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States neclimdul Houston, TX

    Yeah thanks, I was only reviewing this in D9. This correctly supports the 2.x HAL branch in Drupal 10 and I confirmed its backwards compatible with Drupal 9 and the 1.x branch.

  • Status changed to Needs review almost 2 years ago
  • ๐Ÿ‡ช๐Ÿ‡ธSpain manuel.adan ๐ŸŒŒ

    Almost done, thanks contributors on this!. Unfortunately, tests didn't run well on D10. Changes:

    • test compatibility review
    • compatibility with D8 dropped
    • updated CHANGELOG
  • First commit to issue fork.
  • @smeechos opened merge request.
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smeechos

    Created fork + merge request with changes from #10. Only change I made was removing 'core' key from the fixed_block_content.info.yml file, as upon apply the patch in #10, I was getting the following error message:

    Drupal\Core\Extension\InfoParserException: The 'core_version_requirement' constraint (^9 || ^10) requires the 'core' key not be set in modules/contrib/fixed_block_content/fixed_block_content.info.yml in Drupal\Core\Extension\InfoParserDynamic->parse()

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany geek-merlin Freiburg, Germany

    #10 looks reasonable code-wise so i think this can be committed.

    I saw the test configuration is outdated (i can help with that), so manually triggered a test.
    Looks like the module needs 'hal' as dev dependency, because it moved to contrib in D10.

  • Status changed to RTBC almost 2 years ago
  • First commit to issue fork.
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance dydave

    Hi everyone,

    Thank you very much for your great help porting the module to D10 and for all the code contributions, it's greatly appreciated.

    I would like to gladly confirm successfully testing the current fork from #11:

    Tested upgrade with:

     

    Important note: Re: #9
    In drupal 10 core module HAL:

    has been deprecated in Drupal 9.4 and will be removed from Drupal 10.0. The project has moved to the contributed Hypermedia Application Language (HAL) module. The contributed module works with Drupal 9.4+ and Drupal 10.

    https://www.drupal.org/node/3223395#s-recommendations-for-deprecated-mod... โ†’

    Therefore, at this point the module should probably address adding an explicit dependency to contrib module hal โ†’ , which is why I added the commit at #15.
    Without an explicit dependency from the module to contrib hal, it needs to be added at the project's level (composer require drupal/hal).

    We would greatly appreciate if you could please try testing and reviewing the latest changes, in particular, whether the changes to module's dependencies are acceptable and would work in this patch.

    Could you please give us your feedback and let us know if the changes work as expected?

    Feel free to let us know if you have any questions or concerns on any of the recent code changes, or this ticket in general, we would surely be glad to help.
    Thanks in advance.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany geek-merlin Freiburg, Germany

    Yes i wondered if the contrib module works with D9 as well as D10, and you added docs that it does.
    Great news.

    Did you test that manually for D9 too?

    Also it would be nice to trigger the testbot on that all, but i only see the button on the patches, but not MR !2 - any idea why?

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance dydave

    Hi Axel,

    Thanks a lot for your prompt and positive reply on this, it's greatly appreciated.

    Glad we're on the same page for the module's dependencies.

    Did you test that manually for D9 too?

    ah no, not yet, unfortunately, I've mostly tested the fork/patch with the upgrade straight on D10.
    So not tested the fork on a D9 yet, but if I get the time, I will make sure I report back here.

    Also it would be nice to trigger the testbot on that all, but i only see the button on the patches, but not MR !2 - any idea why?

    I've asked on slack at:
    https://drupal.slack.com/archives/C1BB308HH/p1681914427058869
    and I'm not entirely sure, but it might be because automatic testing isn't enabled for the module in issues... perhaps?
    I've checked here: https://www.drupal.org/node/2919542/qa โ†’
    and all I could see is a disabled test: disabled, testing configuration no longer available.

    So maybe if there is at least one valid test configured to be automatically triggered with issues and commits, it should probably fire with changes to merge requests.
     

    Thanks again very much for your great help moving this ticket forward.
    Cheers!

  • Status changed to RTBC over 1 year ago
  • Upload static patch of the latest MR.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany geek-merlin Freiburg, Germany

    Please, if there's a (more modern and maineainer-friendly) MR, don't duplicate that work in patches.
    (If you use them for deployment, note so and hide.)
    Hiding.

  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.0.5 + Environment: PHP 8.1 & MariaDB 10.3.22
    last update over 1 year ago
    16 pass
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 8.1 & MariaDB 10.3.22
    last update over 1 year ago
    16 pass
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.1.x + Environment: PHP 8.1 & MariaDB 10.3.22
    last update over 1 year ago
    15 pass, 1 fail
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ช๐Ÿ‡ธSpain manuel.adan ๐ŸŒŒ

    Latest MR seems OK for me, but unfortunately, starting from Drupal 10.1, block management pages have new paths and menu items โ†’ . This change directly impacts on the Fixed Block Content UI, which relies on existing block management routes and paths.

    To avoid further delays in a D10-compatible release, my proposal here is to restrict compatibility of the D10 initial version to 10.0.x core branch and continue the work for 10.1.x compatibility in a new issue.

  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands Martijn de Wit ๐Ÿ‡ณ๐Ÿ‡ฑ The Netherlands

    Sounds like a steady plan. I think a lot of people are waiting on a 10.x stable release for this module.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain manuel.adan ๐ŸŒŒ
  • Status changed to Fixed over 1 year ago
  • ๐Ÿ‡ช๐Ÿ‡ธSpain manuel.adan ๐ŸŒŒ

    MR merged, thank you everybody!

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joseph.olstad

    ? what does ~10.0.0 mean ?

    Most other projects are specifying only the major version like ^10

    I'm confused, and upgrade_status says to collaborate with the maintainers of this project as if there's no upgrade yet available despite the fact we're using the latest release from just recently

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    Actually, any constrain that is accepted by \Composer\Semver\Semver::satisfies() can be used for core_version_requirement.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance dydave

    Hi Joseph,

    As mentioned above at #22 and if you check the tests at #20, it seems the current code of the module would need to be changed slightly to be compatible with D10.1, thus the tests breaking for 10.1, if you look at #20.
    As mentioned at #22 some routes and maybe other parts of module's code would need to be updated, which should be addressed in related ticket ๐Ÿ“Œ UI updating to block management changes in Drupal core 10.1 Fixed .

    A new branch might have to be created to support versions ^10.1, otherwise, at this point, module's dev version should support ~10.0.0:
    https://git.drupalcode.org/project/fixed_block_content/-/blob/8.x-1.x/fi...

    and therefore be compatible with 10.0.x versions.

    We hope we were able to answer your questions, but feel free to let us know if you encounter more issues or have more concerns, we would surely be glad to help.
    Thanks!

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

Production build 0.71.5 2024