- Issue created by @krystalcode
- π΅πͺPeru krystalcode
This is a patch as a starting point; you won't get the redirect trace with this. Other than that works fine for me and solves various issues such as support for redirects with query parameters.
- Status changed to Needs review
28 days ago 6:55pm 25 August 2025 - First commit to issue fork.
- π¬π§United Kingdom alexpott πͺπΊπ
This needs more changes. We're in a loop for redirect loop detection but that's part of the repository so it shouldn't be doing that here. Plus we should leverage π Invalidate cached responses when new redirects are added Active to get the cacheable metadata correct.
- πΊπΈUnited States mglaman WI, USA
Left a review. I don't love the approach as sites could easily be in a broken state since we can't bump redirect. There's no peerDependency type declaration we could provide
- π¬π§United Kingdom alexpott πͺπΊπ
@mglaman they are not broken - given this actually works on the old redirect repository as we're only passing in an extra parameter... so I could change it to a warning. How does that sound. It would make cacheability stuff less good than it is now. The alternative is to swap out the implementations depending on what redirect version you have. Makes for complicated testing though.
- πΊπΈUnited States mglaman WI, USA
given this actually works on the old redirect repository as we're only passing in an extra parameter.
oh, I didn't test so I thought it was a breaking change. so it's basically backwards compatible? I see, `findMatchingRedirect` added cacheability. And for folks who don't upgrade we lose the cacheability because we no longer do this, correct?
// If there is a response object, add the cacheability metadata necessary // for the traced URLs. array_walk($traced_urls, function ($traced_url) use ($response) { $response->addCacheableDependency($traced_url); });
- π¬π§United Kingdom alexpott πͺπΊπ
#9 exactly. It's an additional argument - this module was kinda working around π Invalidate cached responses when new redirects are added Active - maybe it was not actually tested :) it is now.
- π¬π§United Kingdom alexpott πͺπΊπ
Opened π Only register decoupled_router.redirect_path_translator.subscriber if the Redirect module is installed Active to only have the redirect event when redirect is around. If that landed first then this one could do better re-injecting the repository.
- πΊπΈUnited States mglaman WI, USA
Now that π Only register decoupled_router.redirect_path_translator.subscriber if the Redirect module is installed Active is in, can we rebase off of that and tidy that up here?
-
mglaman β
committed ff48e4a3 on 2.x authored by
alexpott β
[#3525939] feat: Use RedirectRepository for matching redirects By:...
-
mglaman β
committed ff48e4a3 on 2.x authored by
alexpott β
Now that this issue is closed, please review the contribution record.
As a contributor, attribute any organization helped you, or if you volunteered your own time.
Maintainers, please credit people who helped resolve this issue.