Problem/Motivation
In #2887142: NodeType source plugin should include comment information We deprecated comment variable sources in favor of integrating them into NodeType. In order to preserve BC, so code was added to the Comment source, for migrations that might still be using the deprecated sources. This code was encapsulated in a method that was incorrectly marked as deprecated. Deprecated code should not be used anywhere in core. This code is a necessary BC shim intended to be used in Drupal 8 but unneeded in Drupal 9. Therefore this code should not be deprecated until it is no longer needed, i.e. in Drupal 9, and then removed in Drupal 10.
Proposed resolution
Undeprecate the method and file a follow-up issue to deprecate the code in D9, and comment the code with @todos referencing the followup.
Remaining tasks
Do it
User interface changes
none.
API changes
Previously deprecated method Comment::prepareComment() is now marked @internal
Data model changes
none
Release notes snippet
none
Comment | File | Size | Author |
---|---|---|---|
#11 | interdiff.3069055.8-11.txt | 717 bytes | mikelutz |
#11 | 3069055-11.drupal.Properly-deprecate-DrupalcommentPluginmigratesourced6CommentprepareComment.patch | 1.55 KB | mikelutz |
Comments
Comment #2
mikelutzThis method should actually be marked as internal.
Comment #3
mikelutzThis patch should only change documentation, not functionality.
Comment #4
quietone CreditAttribution: quietone commentedJust a typo
s/in in/in
Comment #5
dhirendra.mishra CreditAttribution: dhirendra.mishra at Valuebound for Valuebound commentedLet me do it
Comment #6
dhirendra.mishra CreditAttribution: dhirendra.mishra at Valuebound for Valuebound commentedPls review updated patch
Comment #7
mikelutzI think this needs to be handled a bit differently. patch coming soon.
Comment #8
mikelutzAfter further thought and discussions, this code is used in Drupal 8, and the @internal tag is not realistically respected, so we don't want to just remove an internal method. The actual correct solution here is to simply remove the @deprecated tag, as the method is in use and is therefore not yet deprecated.
When the Drupal 9 branch is opened, the calls to this method can be removed, and it can be deprecated at that time for removal in Drupal 10.
Comment #9
heddnRemoving a deprecation seems fine here.
Comment #10
larowlanwe need to document when the exception can occur, thanks!
Comment #11
mikelutzComment #12
heddnAnd back to RTBC.
Comment #13
alexpottCommitted 239ce7f and pushed to 8.8.x. Thanks!