Automated Drupal 10 compatibility fixes

Created on 15 June 2022, about 3 years ago
Updated 14 January 2024, 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

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.

  • 🇪🇸Spain Francisco Sierra Madrid

    I have updated my website (http://estiloguadarrama.com/) to Drupal 10. Apparently, the module works alright. I have had to use mglaman/composer-drupal-lenient, as indicated in https://stackoverflow.com/questions/74885881/how-to-install-patched-modu... to be able to upgrade Drupal while having gpx_track_elevation installed.

    I have also had to cheat composer by changing the indicated module version, saying it is 1.1 (although the real code is not). If not, the installed module is considered as outdated or not recommended.

    It would be nice if other users can test the patch I provided. And finally, it would be great if the new code can make its way to the recommended version, so as to avoid these pitfalls in using it in Drupal 10.

  • 🇧🇪Belgium Jan Moris

    Dear Francisco,
    I updated my site to Drupal 10, but I'm not able to get GPX_track_elevation-module working properly.
    I'm trying to apply your patch (gpx_track_elevation-D10compatibility-3287794-4.patch) but I'm getting an error.

    [u85125p79776@web0125 demertmp]$ composer update
    Gathering patches for root package.
    Removing package drupal/gpx_track_elevation so that it can be re-installed and re-patched.
      - Removing drupal/gpx_track_elevation (1.1.0)
    Deleting modules/contrib/gpx_track_elevation - deleted
    Loading composer repositories with package information
    Updating dependencies
    Nothing to modify in lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 1 install, 0 updates, 0 removals
    Gathering patches for root package.
    Gathering patches for dependencies. This might take a minute.
      - Installing drupal/gpx_track_elevation (1.1.0): Extracting archive
      - Applying patches for drupal/gpx_track_elevation
        https://www.drupal.org/files/issues/2023-01-08/gpx_track_elevation-D10compatibility-3287794-4.patch (gpx_track_elevation)
       Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2023-01-08/gpx_track_elevation-D10compatibility-3287794-4.patch
    

    What am I doing wrong?
    Any help would be appreciated!!

  • 🇪🇸Spain Francisco Sierra Madrid

    Dear Jan,

    I am not very skilled in using composer. I have not tried to apply the patch through composer. I would suggest to patch the module first (for example, using the patch command in Linux), and then install the module.

    Remember to install mglaman module before installing gpx_track_elevation, as I mention above. The version number in the module (in gpx_track_elevation.info.yml) has to be tricked as well, to make composer believe it is the recommended version. This might be more difficult now, since the 8.x branch has been removed. When I updated my installation, it was still online.

    I could provide the patched module code to you in the way you suggest, out of the official places (this space and the GitLab space).

    By the way, do you know anything about the plans for this module, why the 8.x branch has been removed, etc.? Everything is more cumbersome now, with the module out of maintenance.

    I would offer to contribute maintaining the module if I had enough knowledge of Drupal module structure, but that is not the case.

    I hope this helps somehow. Please let me know what you get.

Production build 0.71.5 2024