Automated Drupal 11 compatibility fixes for honeypot

Created on 17 March 2024, 8 months ago
Updated 21 September 2024, 2 months 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.2

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.5 + Environment: PHP 7.3 & MySQL 5.7
    last update 8 months ago
    29 pass
  • 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 these changes make this module compatible with Drupal 11! 🎉
    Therefore these changes 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
  • Pipeline finished with Failed
    8 months ago
    Total: 277s
    #121639
  • First commit to issue fork.
  • Merge request !26Issue#3430920: Adding D11 support. → (Open) created by ankitv18
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.5 + Environment: PHP 7.3 & MySQL 5.7
    last update 6 months ago
    27 pass, 2 fail
  • Pipeline finished with Failed
    6 months ago
    Total: 329s
    #182374
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.5 + Environment: PHP 7.3 & MySQL 5.7
    last update 6 months ago
    26 pass, 4 fail
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.5 + Environment: PHP 7.3 & MySQL 5.7
    last update 6 months ago
    26 pass, 4 fail
  • Pipeline finished with Canceled
    6 months ago
    Total: 265s
    #182379
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.5 + Environment: PHP 7.3 & MySQL 5.7
    last update 6 months ago
    26 pass, 4 fail
  • Pipeline finished with Canceled
    6 months ago
    Total: 273s
    #182380
  • Pipeline finished with Failed
    6 months ago
    #182383
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.5 + Environment: PHP 7.3 & MySQL 5.7
    last update 6 months ago
    26 pass, 4 fail
  • Pipeline finished with Failed
    6 months ago
    Total: 362s
    #182443
  • Status changed to Needs work 6 months ago
  • 🇺🇸United States tr Cascadia

    Please open a new issue for changes to .gitlab-ci.yml

    That file needs to be changed to support simultaneous testing against the current supported D10 version and also the future D11 version. It needs to configure the tests to run against the minimum supported version of PHP as well as the most recent version of PHP.

    The purpose of these tests against the lowest-supported versions of Drupal core and PHP are so that new patches/MRs don't break existing sites.

    The purpose of the tests against the latest Drupal core and PHP are so we get early warning of changes to core and/or PHP that might affect the operation of this module.

    All these tests need to be run against all new MRs - it is not sufficient just to test the module against the latest HEAD.

    Also read #3325483-4: Drupal Coding Standards Issues | phpcs about some of your other changes. Likewise your changes to the header tests are unrelated and cause test failures. Regardless, this current issue is solely about D11 compatibility, not about PHPCS issues or testing configurations or anything else. Please don't mix unrelated changes together in one MR.

  • First commit to issue fork.
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.5 + Environment: PHP 7.3 & MySQL 5.7
    last update 6 months ago
    29 pass
  • Pipeline finished with Failed
    6 months ago
    Total: 373s
    #186965
  • 🇮🇳India chandu7929 Pune

    Running command ./vendor/bin/drush upgrade_status:analyze honeypot give following status which can be ignored, because its false positive contact/feedback-formis not a library.

    ================================================================================
    Honeypot, --
    Scanned on Fri, 05/31/2024 - 08:21
    
    FILE: modules/contrib/honeypot/tests/src/Functional/HoneypotFormTest.php
    
    STATUS         LINE                           MESSAGE                           
    --------------------------------------------------------------------------------
    Check manually 304  The 'contact/feedback-form' library is not defined because  
                        the defining extension is not installed. Cannot decide if it
                        is deprecated or not.                                       
    --------------------------------------------------------------------------------
    
    FILE: modules/contrib/honeypot/tests/src/Functional/HoneypotFormCacheTest.php
    
    STATUS         LINE                           MESSAGE                           
    --------------------------------------------------------------------------------
    Check manually 93   The 'contact/feedback' library is not defined because the   
                        defining extension is not installed. Cannot decide if it is 
                        deprecated or not.                                          
    --------------------------------------------------------------------------------
    Check manually 96   The 'contact/feedback' library is not defined because the   
                        defining extension is not installed. Cannot decide if it is 
                        deprecated or not.                                          
    --------------------------------------------------------------------------------
    Check manually 103  The 'contact/feedback' library is not defined because the   
                        defining extension is not installed. Cannot decide if it is 
                        deprecated or not.                                          
    --------------------------------------------------------------------------------
    Check manually 105  The 'contact/feedback' library is not defined because the   
                        defining extension is not installed. Cannot decide if it is 
                        deprecated or not.                                          
    --------------------------------------------------------------------------------
    Check manually 110  The 'contact/feedback' library is not defined because the   
                        defining extension is not installed. Cannot decide if it is 
                        deprecated or not.                                          
    --------------------------------------------------------------------------------
    

    Regarding the the remaining test failure see MR:https://git.drupalcode.org/project/rules/-/merge_requests/26/diffs

  • Status changed to Needs review 6 months ago
  • Status changed to Needs work 6 months ago
  • 🇺🇸United States tr Cascadia

    Looks like all false errors in #7. Did you check it manually like the upgrade_status command told you to?

    Honeypot does not define or use a contact/feedback library, so none of the output in #7 is valid.

    The header asserts in the test cases are being addressed by 📌 PHPUnit: Fix Functional Tests 'HoneypotFormCacheTest' Needs review .

  • Status changed to Needs review 6 months ago
  • 🇮🇳India chandu7929 Pune

    Thanks @TR, I ran the scan again today and I don't those issue reported in #7 hence moving in review.

    ================================================================================
    Honeypot, --
    Scanned on Mon, 06/03/2024 - 13:29
    
    No known issues found.
    
  • Status changed to Needs work 6 months ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.5 + Environment: PHP 7.3 & MySQL 5.7
    last update 6 months ago
    29 pass
  • 🇮🇳India chandu7929 Pune

    @vishalkhode - I have remove those changes since its already covered here https://www.drupal.org/project/honeypot/issues/3450488 📌 PHPUnit: Fix Functional Tests 'HoneypotFormCacheTest' Needs review

    The header asserts in the test cases are being addressed by #3450488: PHPUnit: Fix Functional Tests 'HoneypotFormCacheTest'

  • Status changed to Needs review 6 months ago
  • Pipeline finished with Failed
    6 months ago
    Total: 339s
    #191713
  • Status changed to RTBC 6 months ago
  • 🇮🇳India vishalkhode

    Ok, changes looks good to me.

    @vishalkhode - I have remove those changes since its already covered here https://www.drupal.org/project/honeypot/issues/3450488 📌 PHPUnit: Fix Functional Tests 'HoneypotFormCacheTest' Needs review

    The header asserts in the test cases are being addressed by #3450488: PHPUnit: Fix Functional Tests 'HoneypotFormCacheTest'

  • 🇮🇳India vipin.mittal18 Greater Noida

    Hello @TR,

    As you are the only active maintainer, It would be helpful if you could inform us when you intend to release a pre/stable version of honeypot as Drupal 11 stable is nearing its release date. Thanks!

  • Status changed to Needs work 4 months ago
  • 🇺🇸United States tr Cascadia
  • Pipeline finished with Failed
    4 months ago
    Total: 201s
    #227448
  • 🇮🇳India deepakkm

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

  • Pipeline finished with Success
    4 months ago
    Total: 245s
    #232731
  • Status changed to Needs review 4 months ago
  • 🇮🇳India deepakkm

    Pipeline is now green , hence moving ahead for review.

  • Pipeline finished with Success
    4 months ago
    Total: 236s
    #232742
  • Status changed to Needs work 4 months ago
  • 🇮🇳India rajeshreeputra Pune

    Changes looks good, however I don't see CI running for Drupal 11, please add next major support in gitlab CI.

  • Pipeline finished with Success
    4 months ago
    Total: 248s
    #232801
  • Assigned to chandu7929
  • 🇮🇳India chandu7929 Pune

    I will take of failing test on D11

  • Pipeline finished with Success
    4 months ago
    Total: 222s
    #232875
  • Pipeline finished with Failed
    4 months ago
    Total: 214s
    #232990
  • Pipeline finished with Canceled
    4 months ago
    Total: 207s
    #233010
  • Pipeline finished with Success
    4 months ago
    Total: 248s
    #233015
  • Pipeline finished with Success
    4 months ago
    Total: 250s
    #233020
  • Issue was unassigned.
  • Status changed to Needs review 4 months ago
  • 🇮🇳India chandu7929 Pune

    Now all test are passing, hence requesting review.

  • Pipeline finished with Success
    4 months ago
    #233042
  • Status changed to RTBC 4 months ago
  • 🇮🇳India ankitv18

    Changes looks good and pipelines are executed a successful jobs, hence marking this one as RTBC

  • 🇮🇳India vipin.mittal18 Greater Noida

    Hello @TR,

    We are approaching the release of Drupal 11, so should we expect this module to be compatible with Drupal 11? Thanks!

  • 🇮🇳India chandu7929 Pune

    Resolved merge conflict.

  • Pipeline finished with Failed
    4 months ago
    Total: 213s
    #237300
  • First commit to issue fork.
  • Pipeline finished with Failed
    4 months ago
    Total: 229s
    #243994
  • Pipeline finished with Failed
    4 months ago
    Total: 218s
    #244000
  • 🇦🇺Australia VladimirAus Brisbane, Australia

    To test Drupal 11 add to composer.json repositories section:

      "repositories": [
        {
          "type": "vcs",
          "url": "https://git.drupalcode.org/issue/honeypot-3430920.git"
        },
    

    and then run

    composer require drupal/honeypot:dev-3430920-automated-drupal-11
    
  • 🇺🇸United States tr Cascadia

    The 2.2.x branch is working on D11 for more than a week now, and it is being tested against D11 on a regular basis.
    https://git.drupalcode.org/project/honeypot/-/pipeline_schedules

    The 2.1.x branch will not be changed to support D11.

    There will be a 2.2.0 release for the 2.2.x branch in the next week or so after I have seen if anyone reports problems with the upgrade.

  • 🇦🇺Australia VladimirAus Brisbane, Australia

    Pull the finger out and update module description then. 👆

  • 🇺🇸United States dillix

    @TR Can you create release for 2.2 branch?

  • Status changed to Fixed 3 months ago
  • 🇺🇸United States tr Cascadia

    2.2.0 was released on 15 August will D11 support.

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

Production build 0.71.5 2024