fix: #3607821 Fix Drupal 11.4 compatibility for RedirectPathProcessorManager (PathProcessorManager::addInbound() removed)

Fixes the fatal on Drupal 11.4 (Call to undefined method PathProcessorManager::addInbound()) for the RedirectPathProcessorManager approach from issue #2879648.

Core 11.4 rewrote Drupal\Core\PathProcessor\PathProcessorManager to constructor-injected #[AutowireIterator(tag: 'path_processor_inbound')] / path_processor_outbound and removed addInbound()/addOutbound()/getInbound().

Changes:

  • RedirectPathProcessorManager: constructor injects the inbound/outbound processors and calls parent::__construct(); removes the addInbound() override + registration-time applies() gating; processRedirectInbound() iterates $this->inboundProcessors, skipping PathProcessorFiles (and AliasPathProcessor when $skip_alias).
  • redirect.services.yml: autowire: true with $config_factory: '@config.factory'; drops the service_collector/call: addInbound tag.
  • Carries the rest of the #2879648 feature (settings, schema, subscriber, form, repository, tests).

Issue: https://www.drupal.org/i/3607821

AI-Generated: Yes (Used Claude to rewrite RedirectPathProcessorManager and redirect.services.yml for Drupal 11.4 constructor-injected path processors; reviewed by Rajab Natshah.)

Checkpoints

  • File an issue about this project
  • Addition/Change/Update/Fix to this project
  • Testing to ensure no regression
  • Automated unit/functional testing coverage
  • Developer Documentation support on feature change/addition
  • User Guide Documentation support on feature change/addition
  • UX/UI designer responsibilities
  • Accessibility and Readability
  • Reviewed by a human
  • Code review by maintainers
  • Full testing and approval
  • Credit contributors
  • Review with the product owner
  • Update Release Notes
  • Release
Edited by Rajab Natshah

Merge request reports

Loading