Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Mar 2015 at 16:34 UTC
Updated:
3 Apr 2015 at 14:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
joshi.rohit100Not sure whether QueryFactoy should be used or QueryFactoryInterface in constructor (usually we use interface) because if I see QueryFactoy class, it doesn't implement the given interface.
Comment #2
martin107 commentedThanks joshi.rohit100 the patch looks good.
It addresses all my concerns. and make all the error flags my IDE places arround this code go away.
Looking at the QueryFactory and the QueryFactoryInterface
Yes I agree completely, at the moment we are incorrectly linking the Form to a specific implementation, we have lost flexibility, and should be linking it only to a interface. Here is the issue that introduced the interface #2019651: Add a QueryFactoryInterface for QueryFactory classes
Yes QueryFactory itself does not implement the interface, that has been carefully created to match it and I too think it is a bug. It certainly prevents the static analysis tools I am running on this project from doing the relevant double checks.
Its seems that this decoupling it not an accident!
https://www.drupal.org/node/2019651#comment-7537495
A most curious decision. Oh well who am I to blow against the wind....
In short I think you should just change the FieldStorageAddForm parameter definition.
Comment #3
martin107 commentedFixing the interface thing from #1
Comment #5
martin107 commentedI am getting this same unexpected fail in another separate unrelated issue. So I think we might has one off those pesky test instability issues.
Which needs to be confirmed and verified in another issue .. one moment.
Comment #6
jhodgdonThis is not strictly documentation.
Comment #9
sarhugo commentedIf QueryFactory doesn't implement QueryFactoryInterface we should go with patch from #1. Other way the function signature will be wrong.
Comment #10
martin107 commentedOk #2019651: Add a QueryFactoryInterface for QueryFactory classes
added the interface in such a way that it could not be used ... well that is an discussion for 8.1
I am happy for the patch from #1 to go forward an make this issue a documentation only patch again.
Comment #11
joshi.rohit100So are we going with #1 ?
Comment #12
martin107 commentedYes I think that is a good idea.
Comment #13
jhodgdonI'm confused about why in #1 the @var was changed from the interface back to the class, when the input to the constructor is the interface?
Comment #14
sarhugo commentedNot for QueryFactory. The interface used is ConfigFactoryInterface. As mentioned at #9 the QueryFactory class doesn't implement QueryFactoryInterface.
Comment #15
jhodgdonOh right. I was confusing QueryFactory and ConfigFactory. Sorry about that! Agreed with the changes.
Can someone upload the patch from #1 again so it is the last patch on the issue, and hide all the other files, to avoid confusion? Then it should be RTBC. I would do it but I don't deserve the patch credit. ;)
Comment #16
martin107 commentedposting patch from #1
Comment #17
martin107 commentedComment #18
alexpottDocs fixes are not frozen in beta. Committed 1ed3c6f and pushed to 8.0.x. Thanks!