Automated Drupal 10 compatibility fixes

Created on 18 July 2022, almost 2 years ago
Updated 15 March 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

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.

  • πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan
  • πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan
  • πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan
  • Status changed to Needs work over 1 year ago
  • πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan

    πŸ› No assignable roles shown Postponed: needs info

    Had Real physical testing round for RoleAssign 1.0.x-dev with Drupal ~10 and Drupal ~9

    Real-physical-testing-round-for-roleassign-1-0-x-dev--with-d10-and-d9.zip β†’

    RoleAssign 1.0.x-dev with Drupal ~10

    Build Drupal ~10.0 sandbox test site and have Drush ~11.0

    mkdir -p /var/www/html/sandboxes
    composer create-project drupal/recommended-project:~10.0 /var/www/html/sandboxes/drupal10roleassign_1__test
    cd /var/www/html/sandboxes/drupal10roleassign_1__test/
    composer require drush/drush:~11.0;
    

    Change minimum stability to dev for testing on the recommended Drupal 10 project template

    composer config minimum-stability dev
    

    Add the RoleAssign module

    mkdir -p /var/www/html/sandboxes/drupal10roleassign_1__test/web/modules/contrib
    cd /var/www/html/sandboxes/drupal10roleassign_1__test/web/modules/contrib/
    git clone --branch '8.x-1.x' https://git.drupalcode.org/project/roleassign.git
    

    Git Apply the patch.

    cd /var/www/html/sandboxes/drupal10roleassign_1__test/web/modules/contrib/roleassign/
    wget https://www.drupal.org/files/issues/2022-08-24/3297982-drupal-10-compatibility-fixes-roleassign-5.patch
    git apply 3297982-drupal-10-compatibility-fixes-roleassign-5.patch
    

    Change file/directory mod and ownership of files:

    cd /var/www/html/sandboxes/drupal10roleassign_1__test/
    sudo chmod 775 -R .;sudo chown www-data:$USER -R .;
    

    Install with Drush

    ./vendor/drush/drush/drush site:install standard --yes --site-name="RoleAssign 1.0.x-dev - Real physical testing with Drupal ~10" --account-name="webmaster" --account-pass="d" --account-mail="test@drupal.org" --db-url="mysql://root:123___@localhost/sandboxes_drupal10roleassign_1__test" -vvv ;
    
    ./vendor/drush/drush/drush pm:enable roleassign
    

    Rebuild the cache:

    sudo chmod 775 -R .;sudo chown www-data:$USER -R .;
    ./vendor/drush/drush/drush cache:rebuild
    

    Open a browser and change the address to: http://localhost/sandboxes/drupal10roleassign_1__test/web/

    following with

    Configuration

    • Log in as site administrator.
    • Go to the administration page for access control and grant Assign roles permission to those roles that should be able to assign roles to other users. Notice that besides the Assign roles permission, these roles also must have the Administer users permission.
    • Go to the administration page for role assign and select those roles that should be available for assignment by users with Assign roles permission.
    • For each user that should be able to assign roles, go to the user's account and select a role with both the Assign roles and the Administer users permissions.

    Still the module is not functional in Drupal 10 and Drupal 9
    πŸ› No assignable roles shown Postponed: needs info

  • πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan

    It feels that this module is not functional.
    And the assertions in the Automated testing are not doing the right needed checks

  • πŸ‡¨πŸ‡¦Canada teknocat

    I find that this module works sufficiently well in it's current beta state in D9 (no issues for my company's use cases so far) and using the patch for D10 also has it working no differently than the D9 version, at least as far as I can tell.

    This module is currently in a beta release only, so there's an expectation that it still has issues to work out, these issues are known and being worked on and have been discussed here.

    As such, why block a D10 compatibility release just because of these known issues? Why not do another beta release for D10, with these known issues still in progress?

    It doesn't seem necessary to block that until everything is fully resolved and you have a non-beta release ready to go.

  • Status changed to RTBC over 1 year ago
  • πŸ‡¨πŸ‡­Switzerland Berdir Switzerland

    Agreed. Patch in #5 and #10 are pretty identical and changes nothing except the test and version compatibility, so the module should work just as well as it did before.

  • @rajab-natshah opened merge request.
  • πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan

    Thank you, Peter, Sascha for following up.

    Created a MR for the #10 patch
    I tested the module in #17
    The module can be enabled, configured.

    Only faced πŸ› No assignable roles shown Postponed: needs info in Drupal 9 with the 1.0.0-beta1 release.

    Using the issue fork branch and branch for further testing with the composer build.

    I was wondering what is the next step? and when a soft tag release ( pre-release ) would be released?

  • πŸ‡¨πŸ‡¦Canada teknocat

    Would it also make sense to take this opportunity to switch over to semver for D10 and perhaps release it as 2.0-beta1? It would be nice to see all modules do away with the 8.x- prefix on their version numbers, but there does of course need to be an appropriate point at which to do that.

    Just a thought. I've seen some other modules do this, but then the new version is D10 only while they still maintain a separate branch for continued D9 support. I don't see that as necessary unless there's a desire or need to offer a greater range of backwards compatibility, such as D8 versions that don't support the latest core APIs.

  • πŸ‡¨πŸ‡­Switzerland Berdir Switzerland

    There have been no commits in this project for 2 years and barely any since the previous D9 compatibility release. The next step is that either a current maintainer shows up and commits this and creates a new release, or someone applies to become a new maintainer and does the same then.

    In projects I maintain, I'd prefer to not switch to semver just for the sake of it, it tends to take a very long time for even a majority of users to switch over and will cause more work in case of a security issue or so. But that will be for whoever will maintain this in the future to decide.

  • πŸ‡§πŸ‡ͺBelgium svendecabooter Gent

    I am willing to step up to maintain this module and create a Drupal 10 release, as well as look into the other RTBC issues.
    I have some limited maintainer access already, as I've done part of the Drupal 9 upgrade of this module. But I do not have access to Git or release management.
    I have reached out to salvis via his contact form, to be able to get maintainer access.

  • πŸ‡ΈπŸ‡°Slovakia poker10

    @svendecabooter Thanks! I have contacted Salvis about D7 release compatible with PHP8 few days ago, but no answer until now, so hopefully if we get some response we will be able to sort out also D7 version :)

    • nord102 β†’ committed fd48bdb1 on 8.x-1.x
      Issue #3297982 by Project Update Bot, Rajab Natshah, taniachque:...
  • Status changed to Fixed over 1 year ago
  • πŸ‡¨πŸ‡¦Canada nord102

    Thanks all for the contribution on this!

  • πŸ‡§πŸ‡ͺBelgium svendecabooter Gent

    @nord102 do you plan to make a new release with D10 support soon?

  • πŸ‡¨πŸ‡¦Canada nord102

    @svendecabooter yes, just trying to get a few more issues fixed and then I'll do a new release, aiming for the end of this week

  • πŸ‡§πŸ‡ͺBelgium svendecabooter Gent

    Ok great to hear!
    Thanks for your efforts

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

Production build 0.69.0 2024