Problem/Motivation

Drupal\Tests\subpathauto\Kernel\SubPathautoKernelTest::testProcessOutbound fails on Drupal core 11.1 and later. The assertion /node/1/edit/kittens/edit returns the path unchanged.

Root cause: the test's setUp() calls $this->container->get('path_alias.whitelist')->set('node', TRUE); to allow alias lookups for /node/*. Since Drupal 11.1, path_alias.whitelist is deprecated and is now a separate service instance from path_alias.prefix_list (the new service that AliasManager actually reads from).

The last green CI pipeline for `8.x-1.x` was 2024-11-29 on what was then Drupal 11.0/11.1. Between then and now, `path_alias.whitelist` was deprecated in 11.1 (→ `router.prefix_list`, see https://www.drupal.org/node/3467559) and several path-alias-related services were restructured. Outbound lookup for subpaths appears to have regressed as a side effect.

It's blocking every contrib MR's CI. See for example: #2964786: Ignore specific paths and #3603417: Automated Drupal 12 compatibility fixes for subpathauto 1.x-dev

Steps to reproduce

  1. Run vendor/bin/phpunit web/modules/contrib/subpathauto/tests/src/Kernel/ on a site with Drupal core ≥ 11.1.

Proposed resolution

Fix tests/src/Kernel/SubPathautoKernelTest.php:

Remaining tasks

  • Apply the two test changes.
  • Confirm CI pipeline turns green on the issue branch.

User interface changes

None.

API changes

None.

Data model changes

None.

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

batigolix created an issue. See original summary.

batigolix’s picture

Title: Kernel test testProcessOutbound fails on Drupal 11.1+ » testProcessOutbound fails on Drupal 11.1+
Issue summary: View changes
Issue tags: -finalis +finalist-sprint

batigolix’s picture

Status: Active » Needs review