Problem/Motivation

Quick Tabs supports Drupal 10.3+ and Drupal 11:

The focused test suite passes, but Drupal 11.3 reports deprecation notices that should be fixed while preserving Drupal 10.3 compatibility.

The relevant deprecations are:

  1. Functional test classes must specify the #[RunTestsInSeparateProcesses] attribute.
    Not doing so is deprecated in Drupal 11.3 and will throw an exception in Drupal 12.
  2. Providing template_preprocess_quicktabs_view_quicktabs() directly is deprecated in Drupal 11.3 and removed in Drupal 12.
    Initial preprocess should be used instead.

Steps to reproduce

Run the focused tests on Drupal 11.3:

ddev exec vendor/bin/phpunit -c web/core/phpunit.xml.dist tests/src/Kernel/QuickTabsBlockCacheTest.php tests/src/Functional/QuickTabsAdminTest.php

The tests pass, but Drupal 11.3 reports deprecation notices for:

  • Drupal\Tests\quicktabs\Functional\QuickTabsAdminTest
  • template_preprocess_quicktabs_view_quicktabs()

Proposed resolution

Add #[RunTestsInSeparateProcesses] to QuickTabsAdminTest.php.

Add src/Hook/QuicktabsThemeHooks.php with preprocessQuicktabsViewQuicktabs() so Drupal 11.3 Views theme registration can use initial preprocess.

Keep template_preprocess_quicktabs_view_quicktabs() in quicktabs.module as a Drupal 10.3 compatibility delegate.

This keeps the existing Quick Tabs Views style template behavior while using the newer Drupal 11.3-compatible preprocess path where available.

Remaining tasks

  • Review the Drupal 10.3 compatibility delegate.
  • Confirm the Drupal 11.3 deprecation notices are resolved.
  • Run coding standards and focused tests.

API changes

No API changes are expected.

Issue fork quicktabs-3605079

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

joelpittet created an issue. See original summary.

joelpittet’s picture

Status: Active » Fixed

Ran all the opt-in tests and seemed to work well. I wonder if the D12 auto one will update itself... I will read there and see

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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