[10.2] RecursiveExtensionFilterIterator is deprecated

Created on 1 April 2024, 3 months ago
Updated 25 June 2024, 2 days ago

Problem/Motivation

Running PHPunit tests, the results includes these two self deprecation notices:

Remaining self deprecation notices (7145)

  7020x: The Drupal\Core\Extension\Discovery\RecursiveExtensionFilterIterator is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Extension\Discovery\RecursiveExtensionFilterCallback instead. See https://www.drupal.org/node/3343023
    2080x in AnnotationProcessingTest::setUp from Drupal\Tests\rules\Unit\Integration\Engine
    1040x in UnBanIpTest::setUp from Drupal\Tests\rules\Unit\Integration\RulesAction
    1040x in BanIpTest::setUp from Drupal\Tests\rules\Unit\Integration\RulesAction
    780x in PathHasAliasTest::setUp from Drupal\Tests\rules\Unit\Integration\Condition
    780x in PathAliasExistsTest::setUp from Drupal\Tests\rules\Unit\Integration\Condition
    ...

  122x: Calling FieldTypePluginManager::__construct() without the $fieldTypeCategoryManager argument is deprecated in drupal:10.2.0 and will be required in drupal:11.0.0. See https://www.drupal.org/node/3375737
    19x in IntegrityCheckTest::setUp from Drupal\Tests\rules\Unit\Integration\Engine
    10x in LoopTest::setUp from Drupal\Tests\rules\Unit\Integration\Engine
    5x in UserUnblockTest::setUp from Drupal\Tests\rules\Unit\Integration\RulesAction
    5x in EntityFetchByFieldTest::setUp from Drupal\Tests\rules\Unit\Integration\RulesAction
    5x in UserRoleAddTest::setUp from Drupal\Tests\rules\Unit\Integration\RulesAction
    ...

This isn't urgent now but will need to be done before a Drupal 11 version and shouldn't hurt to do ASAP in the next release.

Steps to reproduce

Run phpunit --testsuite="unit" with rules installed.

Proposed resolution

The first one sounds like a straightforward swapping out one function for another. The other needs a new parameter so I don't know how much that entails.

📌 Task
Status

Fixed

Version

4.0

Component

Tests

Created by

🇨🇦Canada ryanrobinson_wlu

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024