Closed (fixed)
Project:
Drupal core
Version:
9.0.x-dev
Component:
views.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Nov 2019 at 04:12 UTC
Updated:
19 Feb 2020 at 10:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
andypostAdditionally removes
cacheableproperty, needs more work to addmaxage: -1or update this exported viewsComment #5
andypostFix CS
Comment #6
andypostProbably this issue could be split on removal of code and another one for interdiff in #2 which is postponed on #3087644: Remove Drupal 8 updates up to and including 88**
Comment #7
stefdewa commentedComment #8
stefdewa commentedComment #9
stefdewa commentedStarted from original patch and ran drupal-check. Fixed all deprecation warnings (usage of REQUEST_TIME constant) and created a new patch.
Don't really get why the cacheable attribute needs to be removed. If that is required it should be clear why this needs to be done. Leaving this on 'Needs work' because obviously I am missing something.
Comment #10
wim leersThanks for getting this back on track @Stefdewa, this looks very close! I found only two problems in the patch:
AFAICT we should inject the
datetime.timeservice here.OTOH … that itself ironically introduces some BC break risk 🤦♂️
So … I think we should keep this as-is in the patch, but add a
// @todo …comments to all of the occurrences I quoted (which excludes all occurrences in tests, where using\Drupal::…is fine), with those comments pointing to a follow-up issue we already create here.Hm … 🤔
Calls that do
->get()will now result in a!isset($this->storage[NULL])check getting evaluated, which does not really make sense. I think this is intended to throw a\InvalidArgumentExceptionwhen$key === NULL, with the message saying::getAll()should be called instead.P.S.: thanks to this patch I also spotted #3097453-15: Remove system.module BC layers 🥳🙏
Comment #11
berdirJust like #2893804: Remove rest.module BC layers, we should IMHO not mix removing BC layers with removing deprecated calls like REQUEST_TIME or that new symfony event stuff. That's making this harder to review and it's not what this issue is about. REQUEST_TIME has separate issue and AFAIK the event class renames do too.
Comment #12
stefdewa commentedWoops, sorry for being overzealous :)
I removed the REQUEST_TIME changes and updated the get function following to the feedback in #10.
Comment #13
wim leersNo worries 😊
Here's the interdiff for #9 → #12.
Comment #14
wim leers#12 did address both points in #10. The first point was addressed in a different way per @Berdir's remark in #11 (and removing the tag). For the second point, this change can be found in the interdiff for #12:
👍
There are a few coding standards violations in here stillDrupalCI will fail coding standards — oddly enough @andypost already fixed those in #5. I suspect you started from #2 instead of #5, @Stefdewa? Anyway, no big deal obviously, fixed that for ya :)
And with that, this is RTBC! 🚢
Thanks! 🥳
Comment #15
alexpottThis is a subtle behaviour change. Before if you passed in an empty string you'd get all data back and you would not end up setting up a cache entry for an empty string. Also we should should the legacy test to test whatever we decide to do here.
Comment #16
longwaveThis comment needs updating as "all tables" is now incorrect.
Comment #17
wim leers… but … that old behavior is exactly what the deprecation was about?Oh, no, the deprecation was about
$key = NULL, not about$key = ''. Good catch!Comment #18
longwaveAddressed #15 and #16, also removed some @see tags that refer to deprecations that have now been removed.
Comment #19
wim leersI think this one was fine actually, but don't feel strongly about this.
Ideally this would use a
@dataProviderto once test with''and once withNULL?Comment #20
longwaveI didn't think the reference to getAll() added anything. Added a dataProvider and also tested the edge case of 0 which is also "empty".
Comment #21
andypostPatch still applies and looks RTBC
Comment #22
andypostComment #23
wim leersRTBC++
Comment #24
alexpottCommitted 18d5319 and pushed to 9.0.x. Thanks!