Automated Drupal 11 compatibility fixes for diff

Created on 17 March 2024, 3 months ago
Updated 13 June 2024, 14 days ago

Problem/Motivation

Hello project maintainers,

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

Changes will periodically be added to this issue that remove deprecated API uses. To stop further changes 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 "ProjectUpdateBotD11" tag from the issue to stop the bot from posting updates.

The changes 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 changes 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 "ProjectUpdateBotD11" tag is left on this issue, new changes 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 changes 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 changes. The bot will still post new changes then if there is a change in the new generated patch compared to the changes that the bot posted last. Those changes are then up to humans to integrate.

  2. Leave open but stop new automated changes.

    If you want to use this issue as a starting point to remove deprecated API uses but then don't want new automated changes, remove the "ProjectUpdateBotD11" tag from the issue and use it like any other issue (the status does not matter then). If you want to receive automated changes again, add back the "ProjectUpdateBotD11" 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 changes will be posted here.

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

    If you are using another issue(s) to work on Drupal 11 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.

Using the merge request

  1. Review the merge request and test it.
  2. Thoroughly test the changes. These changes 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 merge request, create a new branch and merge request and work from there.

Warning: The 'project-update-bot-only' branch will always be overwritten. Do not work in that branch!

Providing feedback

If there are problems with one of the changes 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

2.0

Component

Code

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

Merge Requests

Comments & Activities

  • Issue created by @Project Update Bot
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 3 months ago
    31 pass, 6 fail
  • This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request is also openend and updated.

    It is important that any automated tests available are run and that you manually test the changes.

    Drupal 11 Compatibility

    According to the Upgrade Status module → , even with these changes, this module is not yet compatible with Drupal 11.

    Currently Drupal Rector, version 0.20.1, cannot fix all Drupal 11 compatibility problems.

    Therefore these changes did not update the info.yml file for Drupal 11 compatibility.

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

    Debug info

    Bot run #11-121090

    This patch was created using these packages:

    1. drupal/upgrade_status: 4.1.0
    2. mglaman/phpstan-drupal: 1.2.7
    3. palantirnet/drupal-rector: 0.20.1
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 3 months ago
    31 pass, 6 fail
  • The last submitted patch, 2: diff.8.x-1.1.rector.patch, failed testing. View results →
    - codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • 🇺🇸United States dillix
  • Status changed to Needs review 3 months ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 3 months ago
    31 pass, 6 fail
  • This comment was forced and has ignored the check if a change was already posted. This is only done when we want to update the issue without waiting for changes to happen.

    This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.

    It is important that any automated tests available are run and that you manually test the changes.

    Drupal 11 Compatibility

    According to the Upgrade Status module → , even with these changes, this module is not yet compatible with Drupal 11.

    Currently Drupal Rector, version 0.20.1, cannot fix all Drupal 11 compatibility problems.

    Therefore, these changes did not update the info.yml file for Drupal 11 compatibility.

    The compatibility issues that Upgrade Status found after the Drupal Rector fixes were applied are attached to help you resolve them manually.

    Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot → to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.

    Debug information

    Bot run #11-137198

    These packages were used to generate the fixes:

    1. drupal/upgrade_status: 4.1.0
    2. mglaman/phpstan-drupal: 1.2.10
    3. palantirnet/drupal-rector: 0.20.1
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 3 months ago
    31 pass, 6 fail
  • The last submitted patch, 6: diff.1.x-dev.rector.patch, failed testing. View results →
    - codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • 🇮🇳India dev16.addweb

    silvi.addweb → made their first commit to this issue’s fork.

  • Merge request !56Fixed drupal 11 compatibility. → (Closed) created by Unnamed author
  • 🇮🇳India dev16.addweb

    I have check drupal 11 compability using upgrade status, I have seen the deprecated method loadRevision() error Which is solved in https://www.drupal.org/project/diff/issues/3407021 📌 Use type-hinting on deprecation warnings for loadRevision() Closed: duplicate But this not merge yet, So I have added only core_version_requirement fixes in #9 and created MR

  • Status changed to Needs review about 2 months ago
  • First commit to issue fork.
  • Pipeline finished with Success
    about 2 months ago
    Total: 620s
    #168757
  • Pipeline finished with Success
    about 2 months ago
    Total: 380s
    #168771
  • 🇮🇳India ankitv18

    Rebased with 8.x-1.x branch and pushed changes with D11 support.
    Gitlab CI is passing now ~~ this issue is ready for review.

  • First commit to issue fork.
  • Pipeline finished with Failed
    about 2 months ago
    Total: 429s
    #169362
  • Status changed to Needs work about 1 month ago
  • 🇮🇳India vishalkhode

    The following PHPUnit tests are failing on Drupal 11 and this needs to be fixed:

  • Pipeline finished with Failed
    about 1 month ago
    Total: 482s
    #172964
  • Merge request !63Issue #3429862: Adding D11 support. → (Merged) created by ankitv18
  • Pipeline finished with Failed
    about 1 month ago
    Total: 446s
    #172977
  • Pipeline finished with Failed
    about 1 month ago
    #172980
  • Pipeline finished with Failed
    about 1 month ago
    Total: 10848s
    #172992
  • Pipeline finished with Failed
    about 1 month ago
    Total: 593s
    #174114
  • Pipeline finished with Success
    about 1 month ago
    Total: 438s
    #174157
  • Status changed to Needs review about 1 month ago
  • 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

    Tests are passing in the merge request.

  • First commit to issue fork.
  • Pipeline finished with Canceled
    about 1 month ago
    Total: 280s
    #176194
  • Pipeline finished with Failed
    about 1 month ago
    #176196
  • Pipeline finished with Failed
    about 1 month ago
    Total: 775s
    #176205
  • Pipeline finished with Failed
    about 1 month ago
    Total: 229s
    #176219
  • 🇨🇭Switzerland Berdir Switzerland

    I updated the .gitlab-ci.yml so that next major testing is working, which essentially means running concurrent tests through run-tests.sh (which is much faster too) and the deprecation workaround until #3400979: Is SYMFONY_DEPRECATIONS_HELPER: weak correct for contrib deprecation testing needs? → is merged and available.

    That resulted in some test fails, which I fixed (old config schema for sequences and a removed views key). With that, phpunit (next major) is now green.

    Previous minor is failing, somehow there's a difference in core whether it shows closed or hidden, didn't investigate. I prefer keeping previous minor testing on so I can ensure that there are no regressions with still-supported minor versions, but seems a bit tedious to handle that. Could be re-enabled after 10.3 is out. Removed that for now, see https://git.drupalcode.org/issue/diff-3429862/-/jobs/1626487 for the test fail.

    As for next minor/major testing, my approach for that is to remove that from the default config before committing the D11 merge requests and then setting up a weekly schedule with that on. The idea is that I test as much backward as possible as merge requests might break that. But it's quite unlikely that merge requests break forward compatibility. Instead, that happens due to core changes, so the weekly test informs me if that starts to fail (although next major is set to allow failure, that could be overridden I guess). The plan is a bit work in progress. But that's up to the maintainer to decide how to merge this.

    Would be great to get this in so I can proceed with 📌 Add support for Drupal 11 Needs review without having to add workarounds (as it as a require-dev on diff module).

  • Pipeline finished with Failed
    about 1 month ago
    Total: 241s
    #176221
  • 🇨🇭Switzerland Berdir Switzerland

    I had also fixed an incorrect merge for phpcs/phpstan allow failure override.

    But now that is actually failing on both current and next minor/major versions. I removed the loadRevision() false positives from the baseline, but next minor/major have deprecations too. It would probably be possible to add deprecation helper calls to remain compatible back at least to 10.1, with corresponding phpstan ignore comments if necessary, or it might be possible to override next major/minor phpstan jobs to allow failures again, but personally I think that's not really worth the effort.

  • Pipeline finished with Success
    about 1 month ago
    Total: 234s
    #176240
  • Status changed to Needs work about 1 month ago
  • 🇦🇺Australia acbramley

    As discussed in slack, I'd like to keep enforcing phpstan passing. As a maintainer, I'd rather the MR pipeline fail outright than having to check every time if any regressions have been introduced there. The problem is now of course that the next major runs are failing because, well, code is deprecated there that isn't in our current major. It makes no sense to me to fail phpstan on next major.

    The current MR also introduces new failures on the current major with the baseline changes so back to NW.

  • Pipeline finished with Canceled
    about 1 month ago
    Total: 29s
    #176883
  • Assigned to ankitv18
  • Pipeline finished with Success
    about 1 month ago
    Total: 267s
    #176885
  • Pipeline finished with Failed
    about 1 month ago
    Total: 241s
    #176913
  • 🇨🇭Switzerland Berdir Switzerland

    > The current MR also introduces new failures on the current major with the baseline changes so back to NW.

    The baseline changes are to fix failures that also happened on the current branch, not just next. Those changes apparently happen due to phpstan and related dependency updates.

  • Pipeline finished with Failed
    about 1 month ago
    #176936
  • Pipeline finished with Failed
    about 1 month ago
    Total: 239s
    #177023
  • Pipeline finished with Success
    about 1 month ago
    Total: 236s
    #177031
  • Pipeline finished with Success
    about 1 month ago
    Total: 256s
    #177115
  • Pipeline finished with Failed
    about 1 month ago
    Total: 325s
    #177121
  • Pipeline finished with Success
    about 1 month ago
    Total: 231s
    #177130
  • Issue was unassigned.
  • Status changed to Needs review about 1 month ago
  • 🇮🇳India ankitv18

    Hi @acbramley,
    I've updated MR!63 please review.

  • Pipeline finished with Failed
    about 1 month ago
    #177146
  • Pipeline finished with Failed
    about 1 month ago
    #177147
  • Pipeline finished with Success
    about 1 month ago
    Total: 312s
    #177149
  • Status changed to Needs work about 1 month ago
  • 🇦🇺Australia acbramley

    The baseline changes are to fix failures that also happened on the current branch, not just next

    Yes but then it started failing phpstan. HEAD was updated and fixed to include this with the PHP 8.1 requirements.

  • Pipeline finished with Success
    about 1 month ago
    Total: 216s
    #177619
  • Pipeline finished with Failed
    about 1 month ago
    Total: 308s
    #177656
  • Pipeline finished with Success
    about 1 month ago
    Total: 217s
    #177662
  • Status changed to Needs review about 1 month ago
  • Pipeline finished with Failed
    about 1 month ago
    Total: 210s
    #177871
  • Status changed to Needs work about 1 month ago
  • 🇮🇳India vishalkhode

    The CI for previous major is failing. Can we get that fixed ? Looks like adding following variable would fix the issues:

    variables:
      CORE_PREVIOUS_PHP_MIN: 8.1
    
  • First commit to issue fork.
  • Pipeline finished with Failed
    about 1 month ago
    Total: 319s
    #177892
  • 🇨🇭Switzerland Berdir Switzerland

    > CORE_PREVIOUS_PHP_MIN: 8.1

    That's a neat idea, but there are tons of test fails on previous major and some on previous minor too. Can't commit like this. Either we need to remove previous minor/major testing or we could also set them to allow failure, then we could at least manually verify if there are *new* changes if we want to, but also seems like a waste of resources. Decision for @acbramley to make.

    > Could we consider enabling PHPStan checks on the next major version? While it's understandable that we might encounter some failures, setting it to 'allow failure' could still be beneficial. This way, we can ensure it runs and provides us with valuable insights.

    I believe it is not useful. The insights are for the pretty far future, nothing we need to fix now. That said, my proposal is to not commit with next minor/major testing anyway and only do that on a weekly schedule, so it won't run in on merge requests either way. Again. decision for @acbramley.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 237s
    #178188
  • Pipeline finished with Failed
    about 1 month ago
    Total: 225s
    #178200
  • Pipeline finished with Failed
    about 1 month ago
    Total: 253s
    #178211
  • Pipeline finished with Failed
    about 1 month ago
    Total: 251s
    #178251
  • Pipeline finished with Failed
    about 1 month ago
    Total: 220s
    #178257
  • Pipeline finished with Failed
    about 1 month ago
    Total: 203s
    #178266
  • Pipeline finished with Success
    about 1 month ago
    Total: 272s
    #178323
  • Status changed to Needs review about 1 month ago
  • 🇮🇳India ankitv18

    With these changes https://www.drupal.org/project/diff/issues/3406873 📌 Adopt GitlabCi Fixed Previous minor and major version of phpunit will fail.
    It would be good if maintainer decide what could be the next steps:

    • Whether to include OPT_IN_TEST_PREVIOUS_MINOR and OPT_IN_TEST_PREVIOUS_MAJOR in the gitlab and revert the changes made in the tests files which is pushed in a issue#3406873 📌 Adopt GitlabCi Fixed
    • Or include D11 and issue#3406873 📌 Adopt GitlabCi Fixed in the 2.x branch 📌 Cut a 2.x branch Active
  • Status changed to Needs work about 1 month ago
  • 🇦🇺Australia acbramley

    @ankitv18 those changes were for Drupal 8, we don't support Drupal 8 anymore.

    I'm find this hard to follow as questions are being asked and then more changes are being pushed.

    I do not feel like we need to run tests on previous minor/major. This is just busywork maintenance to keep the tests working. For a module that's already undermaintained for how widely it is used, I would prefer to not have this overhead.

    CORE_PREVIOUS_PHP_MIN: 8.1

    I've bumped the minimum PHP already on 8.x-1.x to 8.1, is this still needed?

    Basically, I agree with #31

  • Pipeline finished with Success
    about 1 month ago
    Total: 469s
    #178759
  • 🇦🇺Australia acbramley

    acbramley → changed the visibility of the branch project-update-bot-only to hidden.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 282s
    #178820
  • Pipeline finished with Failed
    about 1 month ago
    Total: 189s
    #178825
  • Pipeline finished with Failed
    about 1 month ago
    Total: 252s
    #178829
  • Status changed to RTBC about 1 month ago
  • 🇦🇺Australia acbramley

    Thanks for all the work here, we've got green tests for next major and minor and only a small number of phpstan failures on next major which we're ignoring for now (these can be fixed in a follow up but is not a priority).

    Here's what I settled on:

    1. Fail phpcs/phpstan on current version
    2. Allow failures on next major/minor for phpstan
    3. Run tests on next major/minor
    4. Turn off SYMFONY_DEPRECATIONS_HELPER on next major
  • Pipeline finished with Skipped
    about 1 month ago
    #178858
  • 🇦🇺Australia acbramley

    acbramley → changed the visibility of the branch 2.x to hidden.

  • Merge request !80Issue #3429862: D11 support → (Merged) created by acbramley
  • 🇦🇺Australia acbramley

    acbramley → changed the visibility of the branch 3429862-d11-compatibility-fixes to hidden.

  • Status changed to Fixed about 1 month ago
  • First commit to issue fork.
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

    Do you want to leave this open in case there are more automated fixes coming?

Production build 0.69.0 2024