Problem/Motivation
\Drupal\views\ViewExecutable::$display_handler and \Drupal\views\ViewExecutable::$displayHandlers
should have corresponding methods, one could call.
Once we do that, we can also mark the public properties as deprecated
Proposed resolution
Remaining tasks
- Re-roll the patch with the D11 deprecation tags
- Review patch
- Write API changes section
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | drupalcore-fix1-add-getDisplayHandlers-patches-2719171-14-8.patch | 1.44 KB | suntog |
| #13 | drupalcore-fix1-add-getDisplayHandlers-patches-2719171-13-8.patch | 466 bytes | suntog |
| #10 | drupalcore-combine-add-getDisplayHandlers-patches-2719171-10-8.patch | 1.44 KB | suntog |
| #9 | drupalcore-marked-public-properties-as-deprecated-2719171-9-8.patch | 828 bytes | Anonymous (not verified) |
| #8 | drupalcore-add-getDisplayHandlers-2719171-8-8.patch | 526 bytes | suntog |
Comments
Comment #2
rob.barnett commentedLooks interesting. Suntog, Bart85_ and I are going to look at this as part of the first timers sprint. I'm working on getCurrentDisplayHandler method
Comment #3
Anonymous (not verified) commentedI'm helping with this issue as well at the mentored sprint
Comment #4
suntog commentedI am taking a shot at creating a method for ViewExecutable::$displayHandlers.
Comment #5
rob.barnett commentedWe have changes in place. Grabbing lunch and will put our patches together and proceed after lunch.
Comment #6
Anonymous (not verified) commentedFinished marking the public properties deprecated. Creating patch after lunch
Comment #7
rob.barnett commentedAdding a patch for creating ViewExecutable::getCurrentDisplayHandler method. I know this is a partial patch. Suntog and Bart85 are adding the other parts.
Comment #8
suntog commentedAdded an empty method
drupaldrupalcore-add-getDisplayHandlers-2719171-8-8.patch
Comment #9
Anonymous (not verified) commentedMarked the public properties deprecated.
Comment #10
suntog commentedCombine partial previous patches from Bart85 #9, Suntog #8 and rob.barnett #7 into one patch file.
Comment #11
lokapujyaMissing period.
whitespace.
Comment #13
suntog commentedFirst fix for patch, fixed comments.
Comment #14
suntog commentedThe last patch was an inter-diff.
Comment #16
lokapujyaThe fail seems unrelated to the patch. I've queued the test against 8.1.x to see what happens.
Comment #18
marvin_b8 commentedComment #20
lokapujyaComment #21
alexpottCan we add a couple of calls to the new methods? Also
In ViewUI is the only time we write the value through public access AFAICS so do we need to add an unsetter? This is the same with displayHandlers - so maybe what we need is a corresponding reset method on view executable.
That said is the code in ViewsUI::cacheSet() even necessary given ViewExecutable::serialize()?
I think we need to resolve the question about the value writes before we can deprecate the public properties.
Comment #22
lokapujyaIn other words, replace use of the properties with the new getters. We did discuss that at the code sprint and assumed it was out of scope. But, it can be done here.
Aren't there also instances within tests that set the properties? Should those use a setter?
What is the relationship between serialization and cachSet?
We aren't truly deprecating them if they are remaining public. Is the plan to eventually change them to protected?
Comment #24
lokapujyaThis first part should be a simple task: Can we add a couple of calls to the new methods?
Comment #38
mariacha1 commentedComment #39
mariacha1 commentedComment #40
xjmGiven how long it's been since there was activity on this issue and the ongoing discussion about the best approach, it is probably not a good novice issue choice. Thanks!