Beta phase evaluation
Issue category | Task because simplifies code introduced in 8.x... |
---|---|
Issue priority | Normal because planned clean-up |
Prioritized changes | The main goal of this issue is removing previously introduced code that, if used, means that configuration is being created programatically rather than using CMI . |
Disruption | Disruptive for contributed and custom modules if they use the method - however this was only introduced in 8.x. |
Problem/Motivation
Helper method CommentManagerInterface::addDefaultField()
is actively used by tests.
Usage in forum.install
and standard.install
removed in favour of shipped config files.
Proposed resolution
Let's mark the method as deprecated at least by pointing that comment field should be added via config file.
Move code from CommentManagerInterface::addDefaultField()
to trait.
Usage in tests implemented via CommentTestTrait::addDefaultCommentField()
Remaining tasks
1. remove usage form *.install
files and add default fields
2. agree on removal or deprecate
3. patch&commit
User interface changes
none
API changes
Removal of CommentManagerInterface::addDefaultField()
in favour CommentTestTrait::addDefaultCommentField()
Comment | File | Size | Author |
---|---|---|---|
#28 | 2357199-comment-trait-26_.patch | 52.26 KB | andypost |
Comments
Comment #1
andypostMinimal patch to remove the usage from standard and forum install files
Comment #2
andypostAt runtime core needs less functions that we have now
Comment #3
andypostComment #4
naiduharish CreditAttribution: naiduharish commentedI am working on it.
Comment #5
naiduharish CreditAttribution: naiduharish commentedHi @andypost,
I have tried looking into the issue, but I haven't found "addDefaultField()" in forum.install and standard.install files.
Also "CommentManagerInterface::addDefaultField()" is been used in 6 files. So do we need to deprecate the the method and remove from all the tests it has been used.
Thank you.
Comment #6
naiduharish CreditAttribution: naiduharish commentedComment #7
YesCT CreditAttribution: YesCT commentedtags can be confusing.
Thank you for working on this issue.
Note, tags should be separated with a comma, not a space.
The Queue tag was used to line up issues before the sprint. When you work on an issue please add: SprintWeekend2015
(#2407325: preparing for a sprint, would be good to have a list of candidate issues)
Comment #8
andypost@naiduharish yep, the method used in tests only so I suppose better to move it to trait (probably
CommentAddDefaultFieldTrait
) that used in testsComment #9
naiduharish CreditAttribution: naiduharish commented@YesCT Thanks for the feedback, would take care of it here on.
@andypost Thanks for explanation, would work on it.
Comment #10
naiduharish CreditAttribution: naiduharish commentedComment #11
naiduharish CreditAttribution: naiduharish commentedHi @andy,
I have renamed "addDefaultField()" function as "commentDefaultFieldTrait()" in the test files and the CommentManagerInterface.
Comment #12
naiduharish CreditAttribution: naiduharish commentedComment #13
andypostI mean this.
Suppose we need to deprecated the functions first.
PS: patch removes functions for testing purposes
Comment #14
andypostFix the rest
Comment #16
larowlanoh yeah
Comment #17
larowlanWe need a beta-eval here
Comment #18
andypostadded, CRs to update
https://www.drupal.org/node/2100015
https://www.drupal.org/node/2112417
https://www.drupal.org/node/2285633
Probably needs new CR about trait
Comment #19
alexpottYep we need that CR
This is a good change because it encourages people to use CMI properly.
Comment #20
andypost@larowlan please help with CR, seems we need follow-up to clean/normalize
Comment #21
larowlanDraft CR https://www.drupal.org/node/2411239
Comment #22
andypost@larowlan Thanx a lot!
Looks ready for core
Comment #23
alexpottFixing the beta evaluation. Needs a reroll.
Comment #24
alexpottComment #25
alexpott2357199-comment-trait-15.patch no longer applies.
Comment #26
andypostre-roll after #2107243: Decouple entity reference selection plugins from field definitions
Comment #28
andypostre-roll
Comment #29
andypostComment #30
pwieck CreditAttribution: pwieck commentedComment #31
alexpottYep this is part of ensuring the people use CMI properly. Committed 2d714fb and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the issue summary.
Comment #32
andypostWas not commited, link points to bad commit object
Comment #34
alexpottComment #35
yched CreditAttribution: yched commentedOh yeah :-)