Beta phase evaluation

-

Reference: https://www.drupal.org/core/beta-changes
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()

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andypost’s picture

Title: Consider CommentManagrInterace::addDefaultField() as deprecated and remove » Consider CommentManagerInterface::addDefaultField() as deprecated and remove
Issue summary: View changes
Issue tags: +Novice

Minimal patch to remove the usage from standard and forum install files

andypost’s picture

Issue summary: View changes
Parent issue: » #2188287: Split CommentManager in two

At runtime core needs less functions that we have now

andypost’s picture

Issue tags: +@deprecated
naiduharish’s picture

Assigned: Unassigned » naiduharish
Issue tags: -@deprecated +@deprecated @SprintWeekend2015Queue

I am working on it.

naiduharish’s picture

Hi @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.

naiduharish’s picture

Assigned: naiduharish » Unassigned
YesCT’s picture

Issue tags: -@deprecated @SprintWeekend2015Queue +@deprecated, +SprintWeekend2015

tags 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)

andypost’s picture

@naiduharish yep, the method used in tests only so I suppose better to move it to trait (probably CommentAddDefaultFieldTrait) that used in tests

naiduharish’s picture

@YesCT Thanks for the feedback, would take care of it here on.

@andypost Thanks for explanation, would work on it.

naiduharish’s picture

Assigned: Unassigned » naiduharish
naiduharish’s picture

Hi @andy,

I have renamed "addDefaultField()" function as "commentDefaultFieldTrait()" in the test files and the CommentManagerInterface.

naiduharish’s picture

Assigned: naiduharish » Unassigned
Status: Active » Needs review
andypost’s picture

FileSize
27.12 KB

I mean this.
Suppose we need to deprecated the functions first.
PS: patch removes functions for testing purposes

andypost’s picture

Fix the rest

The last submitted patch, 13: 2357199-comment-trait-13.patch, failed testing.

larowlan’s picture

Status: Needs review » Reviewed & tested by the community

oh yeah

larowlan’s picture

We need a beta-eval here

andypost’s picture

Issue summary: View changes
alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs change record

Yep we need that CR

This is a good change because it encourages people to use CMI properly.

andypost’s picture

Title: Consider CommentManagerInterface::addDefaultField() as deprecated and remove » Consider CommentManagerInterface::addDefaultField() as deprecated and remove in favour of CommentTestTrait
Related issues: +#1847540: [META] Clean up comment module tests and decouple from node

@larowlan please help with CR, seems we need follow-up to clean/normalize

larowlan’s picture

andypost’s picture

Status: Needs work » Reviewed & tested by the community

@larowlan Thanx a lot!
Looks ready for core

alexpott’s picture

Issue summary: View changes
Issue tags: -Needs change record +Needs reroll

Fixing the beta evaluation. Needs a reroll.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
alexpott’s picture

2357199-comment-trait-15.patch no longer applies.

error: core/modules/entity_reference/src/Tests/EntityReferenceSelectionAccessTest.php: No such file or directory

andypost’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
52.26 KB

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 26: 2357199-comment-trait-26.patch, failed testing.

andypost’s picture

Status: Needs work » Needs review
FileSize
52.26 KB

re-roll

andypost’s picture

Status: Needs review » Reviewed & tested by the community
pwieck’s picture

Issue tags: -Needs reroll
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Yep 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.

andypost’s picture

Status: Fixed » Reviewed & tested by the community

Was not commited, link points to bad commit object

  • alexpott committed 2d714fb on 8.0.x
    Issue #2357199 by andypost, naiduharish: Consider...
alexpott’s picture

Status: Reviewed & tested by the community » Fixed
yched’s picture

Oh yeah :-)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.