Problem/Motivation
The documentation of authorize.php
states that
[...] This script actually performs the selected operations without loading all of Drupal, to be able to more gracefully recover from errors.
Yet as of #2016629: Refactor bootstrap to better utilize the kernel this is not true anymore because DrupalKernel::prepareLegacyRequest()
loads all modules.
Proposed resolution
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#8 | 2344017-authorize-should-run-minimal-set-of-modules-8.diff | 2.86 KB | znerol |
#8 | interdiff.txt | 3.96 KB | znerol |
#3 | 2344017-authorize-should-run-minimal-set-of-modules.diff | 1.55 KB | znerol |
Comments
Comment #1
znerol CreditAttribution: znerol commentedComment #2
znerol CreditAttribution: znerol commentedComment #3
znerol CreditAttribution: znerol commentedThis reverts the relevant bits introduced in #538660: Move update manager upgrade process into new authorize.php file (and make it actually work).
Comment #4
znerol CreditAttribution: znerol commentedComment #6
Crell CreditAttribution: Crell commentedThis isn't WSCCI.
Comment #7
znerol CreditAttribution: znerol commentedWell, it was introduced by a WSCCI-tagged issue...
Comment #8
znerol CreditAttribution: znerol commentedTrying a different approach, introduce a
$load_modules
parameter topreHandle()
andprepareLegacyRequest()
.Comment #9
catch#2353357: hook_stream_wrappers_alter() should be removed as it is broken since modules are not loaded on demand might fix the all modules being loaded issue, or this should probably be postponed on that to narrow things down.
Regressions caused by the kernel changes to bootstrap seems very much a request processing issue to me (it is directly in the critical path of request processing, after all), whether or not this issue is deserving of the WSCCI tag.
Comment #10
Crell CreditAttribution: Crell commentedCan we get an testable patch here? And update the IS to make it clear what the bug to be fixed is, since clearly the code does work now...
Comment #11
znerol CreditAttribution: znerol commentedAs per the
@file
documentation comment, the authorize script is supposed to run in a stripped-down environment with only a minimum amount of code loaded. If this is not of importance anymore, then the authorize script should be removed entirely.Comment #12
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedI just read through https://groups.drupal.org/node/24709 (fascinating read, by the way) and it looks like there were two reasons for it not to load all modules:
Overall doesn't seem like a major bug to me, but there are some potential reasons for it to be its own script so changing that would be better discussed in a separate issue.
I think for this issue it's best to just fix the problem. Here's what authorize.php does in Drupal 7:
Anyone know what the Drupal 8 equivalent of that would be?
Comment #19
Mile23This issue might be fixed by #2869573: Remove usages of deprecated DrupalKernel::prepareLegacyRequest(), or else whenever we remove
prepareLegacyRequest()
in D9.Comment #20
Mile23Comment #24
quietone CreditAttribution: quietone at PreviousNext commentedDrupalKernel::prepareLegacyRequest() was removed in Drupal 9.0 in #2869573: Remove usages of deprecated DrupalKernel::prepareLegacyRequest() and Drupal 8 is EOL, so the changes suggested here are no longer relevant.
Therefore, closing as outdated.
Thanks!