Problem/Motivation
#2303673: Implement stackphp; cleanup handlePageCache() and preHandle() Moved the preHandle() call into a stackphp decorator/middleware. This does what is least invasive for that issue as this can be refactored easily after.
Proposed resolution
Move pre handle code into the decorator, remove code from DrupalKernel and call from decorator to DrupalKernel.
Remaining tasks
User interface changes
None
API changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2331913.patch | 20.51 KB | damiankloip |
Comments
Comment #1
larowlanComment #2
damiankloip commentedPatch shortly
Comment #3
damiankloip commentedSo here is a start. I added a trait for the initialize methods. As pre handle and handle page cache both tangle usage of the same methods. Still needs work but let's see how this gets on anyway.
Comment #5
dawehnerSee below, but this can then be moved to the Prehandle wrapper all.
Note: I accidentally also worked on #2331909: Move DrupalKernel::initializeCookieGlobals() into page cache kernel decorator which seems to make sense here. Extract the cookie bit out and replace it with some proper session bit. Later we can easily just remove that new class and be done.
Comment #8
damiankloip commentedLet's postpone this on #2331909: Move DrupalKernel::initializeCookieGlobals() into page cache kernel decorator for now. We could do with that cookie stack middleware.
Comment #9
damiankloip commentedComment #18
andypostComment #20
andypostFirst it needs to be set @internal or even @deprecated
Comment #22
andypostClosed as duplicate #2430201: Do not invoke <code>DrupalKernel::preHandle</code> in subrequests
For performance POV it makes sense to skip
preHandle()for subrequests but now it runningRequestSanitizeron every request because of SA-CORE-2018-002Comment #24
andypost