Problem/Motivation
It's unfortunate, but I already created some public methods in EntityCeDisplayInterface that are just unnecessary:
- setOriginalMode(): I never wanted to create this but thought it was necessary because we need to set a class property $originalMode that is protected, from 'outside'.
- That was dumb, because ConfigEntityInterface::set() exists.
- getConfigDependencyEntityViewDisplays(): Near the end of #3475612: Config dependencies are not properly calculated (just before 3.0.0 had to be released) I argued for making this public because I wanted to reuse/call it from the form.
- Reuse turned out to be impossible, per #3475342-4: Improve CE UI form options visibility and messages, so I made the method protected and removed it from the interface.
Proposed resolution
I would rather set a good example for the future, even though deprecating methods so early is weird. So:
- Remove both methods from the interface
- Mark the public methods as @deprecated. (In the case of getConfigDependencyEntityViewDisplays(), this means making it public again; the public-to-protected change was only commited to -dev so far.)
...because in principle, someone could be calling these two methods from another class.
Remaining tasks
Review MR.
Write short change record mentioning the 2 deprecations.
Issue fork custom_elements-3484476
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
roderikComment #4
roderik@fago for your opinion about whether 'official' deprecations like this are unneeded, this early. (I'd rather just start doing it the 'official' way.)
Comment #7
fagoI'd have preferred keeping the code-base tidy when it's unrealistic that anyone is using that yet. Anyway, I'm fine with your proposal to do it proper from the beginning, let's move one with this.
Comment #9
roderik