Drupal 11 compatibility fixes for flood_control

Created on 16 June 2024, 5 months ago
Updated 18 September 2024, 2 months ago

Problem/Motivation

Drupal 11 compatibility fixes for flood_control

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

RTBC

Version

2.3

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia naveenvalecha New Delhi

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

Merge Requests

Comments & Activities

  • Issue created by @naveenvalecha
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia naveenvalecha New Delhi
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia samit.310@gmail.com

    samit.310@gmail.com โ†’ made their first commit to this issueโ€™s fork.

  • Pipeline finished with Failed
    5 months ago
    Total: 185s
    #206706
  • Pipeline finished with Failed
    5 months ago
    Total: 191s
    #206723
  • Pipeline finished with Failed
    5 months ago
    Total: 237s
    #206743
  • Pipeline finished with Failed
    5 months ago
    Total: 226s
    #206749
  • Pipeline finished with Failed
    5 months ago
    Total: 300s
    #206783
  • Pipeline finished with Failed
    5 months ago
    Total: 164s
    #206800
  • Pipeline finished with Failed
    5 months ago
    Total: 273s
    #206802
  • Pipeline finished with Failed
    5 months ago
    #206811
  • Pipeline finished with Failed
    5 months ago
    Total: 197s
    #206815
  • Pipeline finished with Failed
    5 months ago
    Total: 203s
    #206822
  • Pipeline finished with Failed
    3 months ago
    Total: 159s
    #260190
  • Pipeline finished with Failed
    3 months ago
    Total: 552s
    #260194
  • Pipeline finished with Failed
    3 months ago
    #260201
  • Pipeline finished with Failed
    3 months ago
    Total: 181s
    #260207
  • Pipeline finished with Failed
    3 months ago
    Total: 181s
    #260230
  • Pipeline finished with Success
    3 months ago
    Total: 183s
    #260237
  • Status changed to Needs review 3 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia samit.310@gmail.com

    Hi,

    We should use a new Git Branch/Tag for Drupal 10.2 and 11, As TypedConfigManagerInterface $typed_config_manager changes related to ConfigFormBase are introduced in 10.2.

    Thanks
    Samit K.

  • Status changed to RTBC 3 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States BenStallings

    I can confirm that this installs in Drupal 11 and can be enabled.

  • Status changed to Needs work 3 months ago
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Grevil

    @samit.310@gmail.com

    We should use a new Git Branch/Tag for Drupal 10.2 and 11, As TypedConfigManagerInterface $typed_config_manager changes related to ConfigFormBase are introduced in 10.2.

    I guess, we could simply make it nullable and therefore provide backwards compatibility with D9?

  • Status changed to RTBC 3 months ago
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Grevil

    RTBC +1!

    As I said, we could make TypedConfigManagerInterface nullable and inject NULL if "config.typed" doesn't exist, but Simply dropping the D9 support is fine with me, as it has reached its EOL anyway!

  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands Web-Beest

    Works for me :-)
    RTBC +1

  • First commit to issue fork.
  • ๐Ÿ‡ฏ๐Ÿ‡ตJapan ptmkenny

    I added OPT_IN_TEST_NEXT_MAJOR: '1' so that the tests are actually run against Drupal 11. Tests were all green on Drupal 10, but let's make sure they are also green on 11.

  • Pipeline finished with Success
    about 2 months ago
    Total: 176s
    #291373
  • ๐Ÿ‡ฏ๐Ÿ‡ตJapan ptmkenny

    Looks like the tests are failing on Drupal 11:

    There were 5 errors:
    1) Drupal\Tests\flood_control\Functional\FloodControlUiPageTest::testAccessAdmin
    Symfony\Component\HttpFoundation\Exception\SessionNotFoundException: There is currently no session available.
    /builds/issue/flood_control-3454910/vendor/symfony/http-foundation/RequestStack.php:105
    /builds/issue/flood_control-3454910/web/core/tests/Drupal/Tests/BrowserTestBase.php:440
    2) Drupal\Tests\flood_control\Functional\FloodControlUiPageTest::testAccessAdministerFloodUnblockPermission
    Symfony\Component\HttpFoundation\Exception\SessionNotFoundException: There is currently no session available.
    /builds/issue/flood_control-3454910/vendor/symfony/http-foundation/RequestStack.php:105
    /builds/issue/flood_control-3454910/web/core/tests/Drupal/Tests/BrowserTestBase.php:440
    3) Drupal\Tests\flood_control\Functional\FloodControlUiPageTest::testAccessFloodUnblockIpsPermission
    Symfony\Component\HttpFoundation\Exception\SessionNotFoundException: There is currently no session available.
    /builds/issue/flood_control-3454910/vendor/symfony/http-foundation/RequestStack.php:105
    /builds/issue/flood_control-3454910/web/core/tests/Drupal/Tests/BrowserTestBase.php:440
    4) Drupal\Tests\flood_control\Functional\FloodControlUiPageTest::testAccessNoPermission
    Symfony\Component\HttpFoundation\Exception\SessionNotFoundException: There is currently no session available.
    /builds/issue/flood_control-3454910/vendor/symfony/http-foundation/RequestStack.php:105
    /builds/issue/flood_control-3454910/web/core/tests/Drupal/Tests/BrowserTestBase.php:440
    5) Drupal\Tests\flood_control\Functional\FloodControlUiPageTest::testAccessAnonymous
    Symfony\Component\HttpFoundation\Exception\SessionNotFoundException: There is currently no session available.
    /builds/issue/flood_control-3454910/vendor/symfony/http-foundation/RequestStack.php:105
    /builds/issue/flood_control-3454910/web/core/tests/Drupal/Tests/BrowserTestBase.php:440
    ERRORS!
    Tests: 11, Assertions: 159, Errors: 5.
    

    Setting to "Needs work."

  • ๐Ÿ‡ฏ๐Ÿ‡ตJapan ptmkenny

    The failing tests may be caused by [#3337193].

    FloodControlUiPageTest.php

      /**
       * Create required user and other objects in order to run tests.
       */
      protected function setUp(): void {
        parent::setUp();
    
        $this->adminUser = $this->drupalCreateUser([]);
        $this->adminUser->addRole($this->createAdminRole('admin', 'admin'));
        $this->adminUser->save();
    
        $this->settingsUser = $this->drupalCreateUser(['administer flood unblock']);
        $this->floodUnblockUser = $this->drupalCreateUser(['flood unblock ips']);
        $this->simpleUser = $this->drupalCreateUser([]);
    
        // Flood backends need a request object. Create a dummy one and insert it
        // to the container.
        $request = Request::createFromGlobals();
        $this->container->get('request_stack')->push($request);
    

    There's no session being added here.

  • Pipeline finished with Canceled
    about 2 months ago
    Total: 72s
    #291826
  • Pipeline finished with Success
    about 2 months ago
    #291827
  • ๐Ÿ‡ฏ๐Ÿ‡ตJapan ptmkenny

    Ok, tests are now passing on Drupal 11, so I'm setting this back to "Needs review".

  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands batigolix Utrecht
  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands batigolix Utrecht
  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands batigolix Utrecht
  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands batigolix Utrecht
  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands batigolix Utrecht

    I merged this into a new 3.0.x branch for further D10 and D11 development.

    The 2.3.x will not be updated and stay available for D9 for a while.

  • ๐Ÿ‡ฏ๐Ÿ‡ตJapan ptmkenny

    Thanks! Updating the version so that anyone looking at the issue will be directed to the correct branch.

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

Production build 0.71.5 2024