Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
9 Dec 2019 at 14:00 UTC
Updated:
31 Jan 2020 at 08:29 UTC
Jump to comment: Most recent
Comments
Comment #2
vernitThank you for the contribution!
Please see on the "Automated testing" page.
Comment #3
vernitComment #4
avpadernoIs there anything that need to be fixed? That page just says automated tests aren't enabled.
Comment #5
avpadernoDrupal core controllers, among other classes, are considered internal, and they should not be extended.
Comment #6
mostepaniukvmHi @kiamlaluno,
Thanks, for your time,
I didn't know that controller classes shouldn't be extended.
I will check and work on this problem soon.
Comment #7
avpadernoIt's documented in Drupal 8 backwards compatibility and internal API policy (backend).
Comment #8
avpaderno(I forgot the more explicit point.)
Comment #9
mostepaniukvmI've read carefully Drupal 8 backwards compatibility and internal API policy article.
My module violates described principles multiple times. Controller, render element class, field widget class are extending core classes.
I decorated the core's service instead of replacing it with ServiceProvider with the hope that this is acceptable for contrib module. But it looks like a violation too because I extend core service class.
I really don't sure what to do next with this module. This is not an option to duplicate a lot of code to prevent extending of classes. But I can't find any elegant solution to implement the idea of this module and not break the rules of internal API policy. Could anyone give me any recommendations for this case?
In any case, it was a useful experience for me and I will take it into consideration in designing the next solutions.
Comment #10
avpadernoIt would help if there were a hook to alter the autocomplete, or the label for the autocompleted entity, but (at first sight) I didn't find a hook for that.
Comment #11
avpadernoActually, the only method that would need to be added to the controller used from project is just the following one.
Those are just 14 lines of code.
Comment #12
mostepaniukvmAdded method to controller class to prevent extending core controller class.
Comment #13
avpadernoThank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank all the dedicated reviewers as well.
Comment #14
mostepaniukvmThank you for your time! I will read articles and definitely will stay involved.