Problem/Motivation
In #3084983: Move all the code related to path aliases to a new (required) "path_alias" module the core Path Alias subsystem was deprecated in favor of a new, required, path_alias module. We need to get rid of the legacy code and make the path_alias module optional.
Proposed resolution
Do it
Remaining tasks
TBD
User interface changes
None
API changes
TBD
Data model changes
None
Release notes snippet
TODO
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | commit.txt | 2.27 KB | catch |
| #17 | remove-path-alias-bc-3092090-17.patch | 125.35 KB | wim leers |
| #17 | interdiff.txt | 455 bytes | wim leers |
| #15 | remove-path-alias-bc-3092090-14.patch | 125.35 KB | berdir |
| #11 | remove-path-alias-bc-3092090-11-interdiff.txt | 7.91 KB | berdir |
Comments
Comment #2
berdir> We need to get rid of the legacy code and make the path_alias module optional.
This needs to be split up IMHO.
Getting rid of the legacy code is something we need to do for 9.0 and can start with once 8.8.0 is out because then we'll be removing support for updating from versions earlier than that. Then working on making it optional will most likely have to wait until 9.1+.
Cross-referencing #3093747: Add alias process service back (deprecated) and improve DX around BC path_alias services since that moves the @todo for removing the legacy service definitions around.
Comment #3
berdirAlso, not strictly postponed anymore although it probably makes sense to wait for the other issue to land as well as removing the upgrade path, so I suppose still and leaving it at that.
Also moving below the meta issue to remove deprecated code.
Comment #4
berdirFirst patch, based on #3094292: Remove usages of deprecated path alias services and clear "DeprecationListenerTrait" entries. Felt the urge to remove all that code again after working on the issues leading to this point ;)
This will fail hard in the upgrade path, we need to remove that first and work with database dumps that are based on 8.8.0.
This mostly moves code and doesn't remove except the actual BC layer and tests for it.
Comment #5
plachAll blockers are in
Comment #6
berdirActually has been reverted, but that's the the only blocker, it is still blocked on removing the D8 upgrade path: #3087644: Remove Drupal 8 updates up to and including 88**.
Comment #7
berdirForgot to actually remove a bunch of empty or practically empty classes and their services.
Comment #8
berdirSo, earlier patches were so horrible that they broke testbot. Berdir--.
This seems much better so far with a bunch of manually executed functional and kernel tests, lets try again.
Comment #9
berdirTurns out the update path tests aren't failing because nothing seems to actively call one of the removed services and the event subscribers are gone, at least not with just core and the path that we're testing.
Will have a look at the remaining fails, but I suppose it still makes sense to wait on the other issue before we commit it then.
Comment #10
plachThanks @Berdir!
We're missing the
path.alias_storageservice :)Tagging as needing follow-up to make
path_aliasoptional, I still have some code somewhere that could be used as a starting point. I'll create the issue later if none beats me to it.Comment #11
berdirRemoving the deprecated path hooks, the path.alias_storage service definition and also adding path_alias to a few failing kernel tests which all had a loop over all modules including workspaces and that was unhappy about path_alias not being installed.
We should be able to remove these again once we make it actually optional, but this shows that the workspaces subscriber will then need to change this an optional dependency.
Comment #13
amateescu commentedYup, it makes sense to make the path alias part of
WorkspaceRequestSubscriberoptional. Maybe the easiest way to do that is to move it to another class/service which is registered dynamically inWorkspacesServiceProvider?Comment #14
plachCreated #3096092: Make "path_alias" module optional.
Comment #15
berdirReroll, lets see if this works now.
Comment #16
berdirComment #17
wim leersÜbernit: double empty line. Fixed.
This looks great. 80% of it is following the pattern of
class Undeprecated extends Deprecated {}→class Undeprecated {…………}and copying over all the code fromDeprecatedintoUndeprecated. That means the patch seems enormous, but it's actually following a steady pattern.I feel like an asshole for finding a single nit but … hey … what can I do about it? 😅 I did actually find more nits but they are all pre-existing problems, and fixing those would interfere with the "just copy code verbatim" pattern I just described.
So: 🚢
Comment #19
catchFixed some cs issues on commit (see commit.txt).
Committed 474a690 and pushed to 9.0.x. Thanks!