Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Suggested commit message
Issue #2301319 by pwolanin, dawehner, Wim Leers, effulgentsia: MenuLinkNG part5: Remove dead code; and party!
Problem/Motivation
After #2301317: MenuLinkNG part4: Conversion goes in there will be some dead code left in core - this patch just removes it.
Proposed resolution
Remaining tasks
User interface changes
API changes
Original report by @effulgentsia
Final chunk after #2301317: MenuLinkNG part4: Conversion. This removes the old menu_link module and dead procedural functions from menu.inc.
Comment | File | Size | Author |
---|---|---|---|
#31 | increment.txt | 2.51 KB | pwolanin |
#31 | 2301319-31.patch | 131.24 KB | pwolanin |
#26 | 2301319-26.patch | 128.73 KB | pwolanin |
Comments
Comment #1
effulgentsia CreditAttribution: effulgentsia commentedComment #2
pwolanin CreditAttribution: pwolanin commentedTesting the full patch with removal after fixing 8.x conflicts
Comment #3
pwolanin CreditAttribution: pwolanin commentedHere's a new one including fixups at step 1
Comment #5
pwolanin CreditAttribution: pwolanin commentedHere's the full patch
Comment #6
cilefen CreditAttribution: cilefen commentedThe xhprof runs:
53c29adf192f7.localhost@_drupal8x_menu-bench.xhprof
is a load of /menu-bench from https://github.com/pwolanin/menu_bench.git on HEAD.53c2d8e0670a6.localhost@_drupal8x_menu-bench.xhprof
is the same with last patch.Comment #7
xjmComment #8
xjmComment #9
pwolanin CreditAttribution: pwolanin commentedHere's the current full patch
Comment #10
pwolanin CreditAttribution: pwolanin commentedCurrent full patch after part1 is committed.
Comment #12
pwolanin CreditAttribution: pwolanin commentedRebases cleanly, not sure why it doesn't apply
Comment #13
pwolanin CreditAttribution: pwolanin commentedThis should be the full remaining patch since parts 1 and 2 are committed.
Comment #14
pwolanin CreditAttribution: pwolanin commentedupdated combined patch and part5 only
Comment #16
pwolanin CreditAttribution: pwolanin commentedwith fixes from part4
Comment #17
pwolanin CreditAttribution: pwolanin commentedUpdated full remaining patch
Comment #19
pwolanin CreditAttribution: pwolanin commentedre-rolled full patch
Comment #20
pwolanin CreditAttribution: pwolanin commentednew snapshot of the full patch
Comment #21
pwolanin CreditAttribution: pwolanin commentedUpdated patch with all changes from part4, and some small added cleanup
Comment #23
pwolanin CreditAttribution: pwolanin commentedWith part4 system controller fixes
Comment #25
pwolanin CreditAttribution: pwolanin commentedadding in fixes from part4
Comment #26
pwolanin CreditAttribution: pwolanin commentedlast part!
Final patch after #2301317: MenuLinkNG part4: Conversion
Comment #27
effulgentsia CreditAttribution: effulgentsia commentedLooks good! Just deletions of functions in menu.inc, and the old menu_link module, whose .info.yml was already deleted in part 4.
After this lands, we should go back to the part 4 change records, and ensure these menu.inc deletions are referenced in there:
Comment #28
xjmThanks @effulgentsia! I checked and these are covered in https://www.drupal.org/node/2302069 with updates I wrote yesterday:
const MENU_MAX_DEPTH = 9;
function menu_load_links($menu_name) {
function menu_delete_links($menu_name) {
Covered in previous CR https://www.drupal.org/node/2240003
function menu_link_get_preferred($path = NULL, $selected_menu = NULL)
No references I found:
function menu_set_active_menu_names($menu_names = NULL) {
function menu_get_active_menu_names() {
function menu_link_rebuild_defaults() {
Comment #29
xjmTagging the child issues retroactively.
Comment #30
alexpottMenuHierarchy still uses MENU_MAX_DEPTH.
Comment #31
pwolanin CreditAttribution: pwolanin commentedI think we can just remove that class - the menu tree storage should not be access by Views.
Comment #32
xjmWe discussed this a bit in IRC. As nothing is using this handler in core and there is no test coverage for it, @damiankloip and I are okay with simply removing the handler, at least here. I've left a message asking @dawehner to make the call as to whether we should consider this a regression that needs a followup.
Comment #33
effulgentsia CreditAttribution: effulgentsia commentedI also left a comment in #1805996-71: [META] Views in Drupal Core. Even if we need that plugin back, I think that should be a followup rather than hold up this patch, as this plugin is completely broken in HEAD as-is (there's no {menu_links} table to join to). Therefore, back to RTBC if green.
Comment #34
Dries CreditAttribution: Dries commentedCommitted to 8.x. Repeat after me: yay!!! Thanks everyone.