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.

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.

Command icon 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

roderik created an issue. See original summary.

roderik’s picture

Issue summary: View changes

roderik’s picture

Assigned: Unassigned » fago
Status: Active » Needs review

@fago for your opinion about whether 'official' deprecations like this are unneeded, this early. (I'd rather just start doing it the 'official' way.)

fago made their first commit to this issue’s fork.

  • fago committed 723b8c06 on 3.x authored by roderik
    Issue #3484476 by roderik: Deprecate two un-needed EntityCeDisplay...
fago’s picture

Title: Deprecate two EntityCeDisplay methods » Deprecate two un-needed EntityCeDisplay methods
Status: Needs review » Fixed

I'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.

roderik’s picture

Assigned: fago » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.