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.
Once the kernel patch is in, this function should not be used anywhere. Confirm that, then remove it. If it's still used anywhere, fix the places that are using it to do things the new way, then remove it.
I *think* this is Novice-able.
Comment | File | Size | Author |
---|---|---|---|
#25 | 1591618-remove-menu-execute-25.patch | 9.52 KB | Niklas Fiekas |
#25 | 1591618-remove-menu-execute-25-interdiff.txt | 788 bytes | Niklas Fiekas |
#22 | 1591618-remove-menu-execute-23.patch | 10.24 KB | aspilicious |
#21 | 1591618-remove-menu-execute-22.patch | 10.54 KB | aspilicious |
#21 | menu_execute_dif.txt | 1.65 KB | aspilicious |
Comments
Comment #1
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedOther than the function itself I found more (even non-comment) references than I expected:
Comment #2
-enzo- CreditAttribution: -enzo- commentedI'm a little confused with this request. I asked to Crell about this request and he said this function not need to be re-writed, because will be replaced by Kernel::handle($request).
But looks like the function was already updated to use some symfony2 stuff.
Can you double check this issue still requiere some work and explain a little better what is necessary or maybe close this issue.
Regards
enzo
Comment #3
Crell CreditAttribution: Crell commentedmenu_execute_active_handler() has been deprecated by Kernel::handle($request). Anywhere that calls menu_execute_active_handler() (the list in #2 has 2-3 places) needs to be rewritten so that it doesn't, but instead calls $kernel->handle(). (Other changes are likely necessary at that point.) Once that's done, menu_execute_active_handler() itself may be removed entirely.
Comment #4
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedSee also #1622934-9: Replace delivery callbacks by leveraging the HTTP kernel, fix the overlay module .
Comment #5
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedTrickier than expected, because:
This is probably blocking the critical issue I referenced in #4.
Comment #7
aspilicious CreditAttribution: aspilicious commentedPager.inc
Should be
Comment #8
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedOh ... indeed. Thanks.
Edit: I also should have mentioned that the only remaining references to menu_execute_active_handler() are in includes/common.inc doxygen -- on functions that already have issues for removal.
Comment #10
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedPutting some debugging stuff in there, because I can't reproduce it locally.
Comment #12
Crell CreditAttribution: Crell commentedIn response to #5, I think #1595146: Load the HttpKernel from the DI Container may be a dependency for this issue.
Comment #13
aspilicious CreditAttribution: aspilicious commentedCrell in irc we concluded that the $request was empty because it was build way to late in bootstrap phase. I don't see why the DI container fixes this problem?
Comment #14
Crell CreditAttribution: Crell commentedI was referring to point 1, about subrequests.
Comment #15
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedThere are problems that prevent us from easily converting the pager to use requests() rather than $_GET. I'd vote for handling that in a seperate issue and getting this one done as soon as possible. So the attached patch is just a straight conversion from menu_execute_active_handler() to subrequests, still leaving in the
$_GET['page'] = $page
and a corresponding TODO.I'd also vote for not blocking on #1595146: Load the HttpKernel from the DI Container. There's a TODO in the code and we can revisit that, once that patch is in.
Comment #16
Crell CreditAttribution: Crell commentedAdding globals is a no-go, especially as that is not going to be a global value for long. If we have to do this temporarily, it should at minimum have a todo to switch it to a container access once the kernel is in the container. (The kernel->container patch would need to do that.)
Otherwise I think this looks reasonable as an incremental step.
Comment #17
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedIsn't this TODO precise enough?
Comment #18
Crell CreditAttribution: Crell commentedEh, maybe. I'd still prefer to put big "here be dragons" fences around every instance of the string "global". :-)
Comment #19
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedYay, we can now avoid adding new globals using #1595146: Load the HttpKernel from the DI Container! Rerolled the patch (that also no longer applied) and did that.
Comment #21
aspilicious CreditAttribution: aspilicious commentedForgot some stuff :)
Comment #22
aspilicious CreditAttribution: aspilicious commentedHmm forgot to remove the use statements we don't need anymore
Comment #23
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedYes, thanks, that looks better. Probably going to be green and good to go.
Comment #24
Crell CreditAttribution: Crell commentedJust minor nits:
request request? Department of redundancy department. :-)
I'm unclear why the drupal_bootstrap() call is necessary. If we get to this point, wouldn't we already know that the code works? Or is this just for test files?
Comment #25
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedRemoved the stammering.
The drupal_boostrap() is in index.php, too:
Not sure why, but we should mirror that in the tests.
Comment #26
Crell CreditAttribution: Crell commentedhm. We can maybe remove that later, but good enough for now.
Comment #27
Dries CreditAttribution: Dries commentedCommitted to 8.x. Thanks!
Comment #28
sunWow. :)
It would be great if we could find a way to announce major changes like this. I understand that the intention is to collect/summarize all these changes in a single change notice. However, that inherently circumvents any API change notification mechanism (whereas the relaying to @drupal8changes is the most effective from my perspective). In other words, I'm fine with the idea of collecting/summarizing related changes, but would highly appreciate some kind of an announcement for actual API changes.
To facilitate that, we should make sure to at least tag issues accordingly with one or more of "API change", "API addition", or "API clean-up"
If all goes well, this comment will trigger a new change notification mechanism already. :)