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 callsparent::__construct(); removes theaddInbound()override + registration-timeapplies()gating;processRedirectInbound()iterates$this->inboundProcessors, skippingPathProcessorFiles(andAliasPathProcessorwhen$skip_alias).redirect.services.yml:autowire: truewith$config_factory: '@config.factory'; drops theservice_collector/call: addInboundtag.- 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