After discussion with damiankloip, dawehner and alexpott on IRC we concluded that this issue isn't a part of #2016679: Expand Entity Type interfaces to provide methods, protect the properties as previous stated.
Instead we concluded this should be about refactoring ViewStorageInterface to ViewEntityInterface. The problem with the ViewStorageInterface is that it suggest that is extending the EntityStorageInterface and it does not. The ViewStorageInterface is extending the ConfigEntityInterface and it will be better for the developer experience if the interface is renamed to ViewEntityInterface.
Also is the class variable $id being set from public to protected.
TODO
- 3 small updates to the current patch. See the comment #33 from @alexpott.
Comment | File | Size | Author |
---|---|---|---|
#35 | interdiff-30-35.txt | 1.44 KB | adci_contributor |
#35 | 2030667-35.patch | 28.67 KB | adci_contributor |
Comments
Comment #1
Thomas Brekelmans CreditAttribution: Thomas Brekelmans commentedI've included a patch which adds:
I didn't think including setters for any property made sense since most of these properties are set implicitly by the ViewExecutable through the system and shouldn't be modified individually, certainly not through the View entity directly I think?
Comment #2
Thomas Brekelmans CreditAttribution: Thomas Brekelmans commentedComment #4
Thomas Brekelmans CreditAttribution: Thomas Brekelmans commentedNot sure how this patch could fail since it only modifies documentation and adds code that isn't called yet (new methods), can anyone explain that or is this just a (temporary) test-bot failure?
Comment #5
Thomas Brekelmans CreditAttribution: Thomas Brekelmans commented#1: view-entity-expand-view-with-methods-2030667-1.patch queued for re-testing.
Comment #7
tim.plunkettI think it was the use Drupal\views\Drupal...
Anyway, we've also discussed renaming the interface, might as well do that here.
Comment #8
tim.plunkettOh! I realized why the other patch failed. We needed to add this to ViewUI.
Comment #9
tim.plunkettTaggin.g
Comment #10
dawehnerThat is a string.
I think we should extend the test coverage of ViewUI then.
Comment #11
dawehner.
Comment #11.0
dawehnerUpdated issue summary.
Comment #12
jibran8: vdc-2030667-8.patch queued for re-testing.
Comment #14
daffie CreditAttribution: daffie commentedThis patch is a year old so it needs a reroll
Comment #15
daffie CreditAttribution: daffie commentedComment #16
filijonka CreditAttribution: filijonka commentedworking on this
Comment #17
filijonka CreditAttribution: filijonka commentedok this will not get back green but need to get some feedback from testbot.
notable changes
1. removed getViewExecutable and used getExecutable that is on head instead.
2. ViewExecutable __construct was wrong, the interface declared parameters that wasn't implemented, the dochead needs still to be updated for that.
3. newDisplay in View entity, not sure if it is really needed but let it stay.
Comment #19
filijonka CreditAttribution: filijonka commentedok so hopefully this will be green now. and if it is then time to check if it do what we are aiming for.
Comment #20
filijonka CreditAttribution: filijonka commentedComment #21
daffie CreditAttribution: daffie commentedWhy do you add these methods. They are never used, so please remove them.
This method is not used and is not implemented by the class View.
Why are these added? If $this->storage is the class View, then they inherit the methods from View. Also they are never used, so please remove them.
Comment #22
filijonka CreditAttribution: filijonka commentedok so everything in comment #21 except for 21.1 for now. and 21.4 I don't understand that sentence.
Comment #23
dawehnerThe issue needs a better issue summary and beta evaluation.
That itself makes sense now ... this is a relict from earlier times BUT the issue summary / beta evaluation should describe how much problems are potentially caused by renaming the interface (small, given that the interface name is not simple to fix).
Can we open up a follow up to kill this ? I think its not something you really need anymore ... it used to be used for version updates between 6 and 7.
In an ideal world the View should not have these methods but rather that logic should live in a separate place, but sure, this is out of scope of this issue.
Comment #24
filijonka CreditAttribution: filijonka commentedI thought that I had removed all not used functions from the View class but apparently only in the interface. done that in this and also protected the property id.
Renaming of the Class from ViewStorageInterface to ViewInterface is as far as I can see a clear API change and hence it shouldn't be done in this face we are know.
The effort to do the renaming and the effects of it seems to be small, I guess it wouldn't be a huge problem to change it back either. I think it wuld be best that we let committers take a look and let them decide.
Comment #25
daffie CreditAttribution: daffie commented@filijonka: Good work!
In the class Entity/View you change the docblock for a number of public methods to inheritdoc. Can you do the same for the public method getExecutable().
For the rest of the patch is it RTBC from me.
Comment #26
daffie CreditAttribution: daffie commentedComment #27
filijonka CreditAttribution: filijonka commentedwaiting for a decision from view maintainers on this issue before going on.
Comment #28
dawehner@filijonka
Please update the issue summary according to our conversation.
Comment #29
filijonka CreditAttribution: filijonka commentedComment #30
filijonka CreditAttribution: filijonka commentedok let's hope we got this right
Comment #31
filijonka CreditAttribution: filijonka commentedComment #32
dawehnerThat itself looks fine!
Comment #33
alexpottIt would be nice if the summary could contain a justification for the interface rename. I know @dawehner and @damiankloip want to do this and I don;t think this is a disruptive change since everything outside of views that wants to typehint on a view would want a ViewExecutable - which is exactly what all the views plugins do.
Just remove the use - this is not used here.
Remove the use - it's not used.
Just remove ViewStorageInterface - it is not actually used in the file :)
Comment #34
daffie CreditAttribution: daffie commentedUpdated the IS with the justification of the interface rename.
Novice TODO:
- 3 small updates to the current patch. See the comment #33 from @alexpott.
Comment #35
adci_contributor CreditAttribution: adci_contributor commentedI'm trying to remove useless 'use'
Comment #36
daffie CreditAttribution: daffie commentedIt all looks good to me.
All the changes that are wanted by @alexpott are implemented.
Back to RTBC.
Comment #37
alexpottViewsStorage/EntityInterface is not used in external typehints - ViewsExecutable is.
This issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed efbaa69 and pushed to 8.0.x. Thanks!
Comment #39
filijonka CreditAttribution: filijonka commentedthanks @daffie for updating the IS.