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:
-
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. -
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.phpThe tests pass, but Drupal 11.3 reports deprecation notices for:
Drupal\Tests\quicktabs\Functional\QuickTabsAdminTesttemplate_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
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
Comment #3
joelpittetRan 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