Closed (fixed)
Project:
Drupal core
Version:
9.3.x-dev
Component:
migration system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Jul 2019 at 22:13 UTC
Updated:
11 Sep 2023 at 03:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mikelutzComment #3
mikelutzComment #5
andypostPatch in related #3092606: Remove comment.module BC layers removes already deprecated
core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.phpComment #6
andypostReroll
Comment #8
swatichouhan012 commentedPatch #6 failed to applied, i have removed unused use statement and updated patch.
Comment #9
swatichouhan012 commentedComment #11
xjmI think we need a proper deprecation here instead of ripping the thing out entirely. :) New deprecations are minor-only, and 8.9/9.0 are in beta, so moving this to 9.1.x. Thanks!
Comment #13
quietone commentedAs xjm says this needs a deprecation notice.
I think this is suitable for a novice task. The Drupal core deprecation policy has instructions for adding a deprecation message to a method.
Comment #14
anmolgoyal74 commentedI hope this is fine.
Comment #15
anmolgoyal74 commentedComment #16
guilhermevp commentedThe patch applies cleanly, however, should we use "BC" in the code documentation?
Comment #18
guilhermevp commentedUpdated documentation removing the abbreviation of backwards compatible since I could not find any other example of it in core and changed the reference to d10 as a future release. Please review.
Comment #19
hmendes commentedFixing patch from #18 to follow standard formats.
Comment #20
andypostFiled CR https://www.drupal.org/node/3221964 and added proper deprecation of the method, also removed the usage
Probably it needs legacy test to make sure the deprecation is thrown when the method is used in inherited plugins
Also updated IS
Comment #22
meenakshi_j commentedTried to fix the fails of #20
Comment #23
rahulkhandelwal1990 commentedUploaded a new patch with test case failure resolution
Comment #24
rahulkhandelwal1990 commentedForgot to upload patch in #23, please review it.
Comment #25
quietone commented@Meenakshi_j and @rahulkhandelwal1990, thanks for working on this. Whenever you make a patch comment on the changes you made and why you made them. See Make the patch.
The latest patch contains changes to tests, /core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php, /core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTest.php and /core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTest.php. Changes to these tests are not expected, or desired, when deprecating a method in a source plugin. The test failures point to a problem caused by some of the code removed.
Did some investigating of the history of the changes for \Drupal\comment\Plugin\migrate\source\d6\Comment::prepareRow and prepareComment are not easy to follow but we have ended up with code in prepareComment() that should be in prepareRow(). The language calculation from #2981392: Comment migration corrupts data with multilingual sites needs to be in prepareRow as does the conversion of the 'status' property.
I have made a new patch based off the patch in #20.
Comment #26
quietone commentedForgot to run commit-code-check.
Comment #27
andypost@quietone thank you a lot, it looks cleaner!
Comment #28
quietone commented@andypost, Glad you like it, thanks for the prompt review!
Comment #29
catchThese look like placeholders, can it just be 'D6 comment test'?
Also we're only testing the deprecation message here so is it possible to do that with purely a unit test?
Comment #30
quietone commentedAh, silly oversight.
This patch adds comments to test module .info file and moves the deprecation test to the existing test of the comment source plugin. It is still a Kernel test but it doesn't load the entire fixture.
Comment #31
andypostThanks!
Not sure that needed
Comment #33
catchThanks for the tidy up. Committed/pushed to 9.3.x, thanks!
Comment #35
quietone commentedPublished the CR