Closed (works as designed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
entity system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
29 Jul 2015 at 17:37 UTC
Updated:
15 Nov 2015 at 07:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jibranComment #2
dawehnerNo, interfaces are there because they are designed like that. Just adding all the methods is not always the best idea. I think its fine in some code to bypass the interface
and use just a specific instance, but ideally no code should have to rely on those public methods.
Comment #3
ysaid commentedComment #4
ysaid commentedI created a patch and done the following :
- 7 public methods of DefaultTableMapping are now declared in TableMappingInterface
- Jibran mentioned DefaultTableMapping::generateFieldTableName in the issue description but it's a protected method. I Didn't include it in TableMappingInterface
It's my first patch and contribution to drupal core, please be kind :)
Comment #5
jibranThank you for your contribution @ysaid. Changes look good only minor spacing issue to address. I have also removed
DefaultTableMapping::generateFieldTableNamefrom issue summary.Extra white spacing.
Comment #6
ysaid commentedThanks for your feedback @jibran. I fixed spaces issues. Please check it.
Comment #7
jibranThanks for the fix @ysaid. It is easier for reviewers if you upload an interdiff.
Comment #8
berdirNo so fast :)
See #2. Just because those methods are public doesn't mean they are supposed to be on an or that interface.
At least @plach should provide his opinion on this, there might be good reasons why this wasn't done.
Comment #9
dawehnerSo +1 to that statement. The interface is designed for a generic table mapping not specific to any implementation vs. the DefaultMapping which has the notion of those specific table types.
Comment #10
plachWhat #9 said. Thanks for the patch @ysaid, it looks perfect, but this is a won't fix by me.
Comment #11
plachOr better: a "works as designed" :)
Comment #12
jibranAs per #9 and #10.