Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
entity system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
17 Jan 2014 at 08:21 UTC
Updated:
12 Oct 2014 at 07:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
chx commentedComment #2
chx commentedComment #3
aspilicious commentedDon't see anything wrong with this
Comment #4
swentel commented+1 from me
Comment #5
webchickCommitted and pushed to 8.x. Thanks!
Comment #6
berdirHm, #2031725: Move all entity display interfaces to the core component did explicitly remove this with a lot of discussions around this.
Comment #7
webchickOh, thanks. Was not aware.
Rolled back for now, pending further discussion.
Comment #8
berdirNot sure if it was necessary, I commented over there to point the involved people to this issue
Comment #9
yched commentedYou don't necessarily have to be a configEntity to do the job of an EntityDisplay ("host display settings for the components of an entity")
Why do we want to mock an EntityDisplayInterface rather than an EntityDisplay or an EntityFormDisplay specifically ?
Comment #10
chx commentedBecause mocking classes is worse than interfaces, you need to disable the constructor, etc.
Comment #11
berdir@yched: The thing is that we need a single interface to type hint in e.g. entity crud hooks, where we want both the ConfigEntityInterface methods and those of EntityDisplay.
The only thing that could work is having both this interface and one for the entity, that extends from this and ConfigEntityInterface, but that also seems fairly complicated.
Comment #12
berdir1: 2175517_1.patch queued for re-testing.
Comment #14
benjy commentedNew patch.
Comment #15
berdirHere's why I think this makes sense:
Code from EmailFieldTest, but any other snippet is just the same:
PhpStorm analysis: "Method 'save' not found in class \Drupal\Core\Entity\Display\EntityDisplayInterface".
Comment #17
benjy commented14: 2175517_14.patch queued for re-testing.
Comment #19
benjy commented14: 2175517_14.patch queued for re-testing.
Comment #20
benjy commentedBack to RTBC, it was just the test bot playing up.
Comment #22
benjy commented14: 2175517_14.patch queued for re-testing.
Comment #23
berdirAw testbot...
Comment #24
fagohm, that was changed by purpose to be decoupled, but #15 and the entity_get_display() documentation provide good reasons to re-introduce the coupling - thus agreed.
Comment #25
catchCommitted/pushed to 8.x, thanks!
Comment #27
alimac commentedPatch in #14 was never committed. Here is the patch for the latest HEAD.
Comment #28
alimac commentedComment #29
berdirWeird, but +1 to the latest patch.
Comment #30
webchickCommitted and pushed to 8.x. For real this time. :)