Most recent comment as of this summary update: #34
Problem/Motivation
The migrate module is still considered an experimental module. As a result, its code and tests have been reviewed less than other more mature code.
Proposed resolution
Adhere to coding standards.
Attached are changes noted during a review of the files in core/modules/migrate/src/*.php. These changes include adding docblocks, missing @param/@var/@return descriptions and a few coding style changes.
Remaining tasks
Re-roll patch
According to comment #13 by @xjm, I think this needs more than just a re-roll. It needs to be broken apart into separate issues and each of those issues should address distinct points.
User interface changes
To be determined
API changes
To be determined
Data model changes
To be determined
Comment | File | Size | Author |
---|---|---|---|
#43 | migrate-module-src-d8-2624640-43.patch | 30.54 KB | vprocessor |
#38 | 2624640-38-migrate-module-src-d8.patch | 30.55 KB | kurthill4 |
#19 | interdiff.txt | 1002 bytes | FernandoHV |
#19 | 2624640-19-migrate-module-src-d8.patch | 30.55 KB | FernandoHV |
#14 | 2624640-14-migrate-module-src-d8.patch | 30.91 KB | Lars Toomre |
Comments
Comment #2
Lars Toomre CreditAttribution: Lars Toomre as a volunteer commentedAttached is an initial patch with changes to sixteen files. The patch was generated with the -U6 switch so that one could more easily see the method signature when type hinting was added.
Comment #3
Lars Toomre CreditAttribution: Lars Toomre as a volunteer commentedCreated #2624648: False sniff for missing comment of a @throws directive in Coder module to address false sniff condition 'Comment missing or not on the next line for @throws tag in function comment' in Drupal.Commenting.FunctionComment.EmptyThrows.
Comment #4
Lars Toomre CreditAttribution: Lars Toomre as a volunteer commentedAdded details about false positive in-line type hint sniff to Coder issue #2624076: Support namespace aliases in /** @var */ definitions.
Comment #5
benjy CreditAttribution: benjy at PreviousNext commentedShouldn't NULL be capitals here?
This seems like a functional change, we shouldn't do that here?
Again, missing an issue. Maybe we should add follow-ups to find issues or remove the todo
Comment #6
Lars Toomre CreditAttribution: Lars Toomre as a volunteer commented@benjy Thanks for the comments. When you have a chance can you take a look at #2621486: Fixes to migrate/tests/src/Unit/*.php files when you have a moment? I cannot figure out for the life of me why MigrateExecutableTest.php has failed (even when it is not included in the patch)? Thanks.
Regarding 5.1, our documentation standards call for it to be null and not NULL. One can check https://drupal.org/node/1354 for more information.
Regarding 5.2, the coder_sniff highlighted this as an error. If you check the file, you will notice that $sourceValues and $destinationValues do not exists independent of the class properties. I am pretty sure that this is what the code intended originally, but am open to any suggested change.
Regarding 5.3, that @todo was already in the code that was committed. If you see an issue for it, I am happy to modify the patch to include it. With a cursurory review, I did not see such an issue open.
Comment #7
benjy CreditAttribution: benjy at PreviousNext commentedYeah, I was just pointing out that todo's should either have an issue or we should create one since we're touching it :)
Comment #8
heddnComment #9
quietone CreditAttribution: quietone commented@benjy, will #2545632: [PP1] Move memory reclamation out of migrate executable do as an issue for the @TODO?
Comment #10
benjy CreditAttribution: benjy at PreviousNext commentedYeah, that works for me.
Comment #11
Lars Toomre CreditAttribution: Lars Toomre as a volunteer commentedAttached are an interdiff and new patch that incorporates the issue #2545632: [PP1] Move memory reclamation out of migrate executable as the subject of the @todo directive.
Comment #12
quietone CreditAttribution: quietone as a volunteer commentedbenjy's concerns in #5 have been answered. The final piece was the addition of a link to an issue in the @todo. With that done this can be RTBC.
Comment #13
alexpottThis functional change implies missing test coverage I don't think it should be in this patch - we should open a separate issue.
Messed up patch
Comment #14
Lars Toomre CreditAttribution: Lars Toomre as a volunteer commentedIssue #2645164: Fix use of $sourceValues and $destinationValues local variables has been created to address change highlighted in #13.1.
Attached are a patch and interdiff that address the failed re-roll update highlighted in #13.2. A couple of other changes were made as a result of reviewing the resulting patch.
Comment #15
quietone CreditAttribution: quietone as a volunteer commentedApologies for missing the conflict in the patch. A new issue has been created as requested and the patch looks good, so back to RTBC.
Comment #16
alexpott@Lars Toomre and the reviewers thanks for your work here. Recently the committer team and @xjm especially have put a ton of work into guidelines for how to scope issues. This issue is a grab bag of fixes that makes it difficult to review see https://www.drupal.org/core/scope for examples of how to scope issues. Ideally all the new documentation what be split into a sensibly scoped patches. And the coding standard fixes can be grouped by standard that can be reviewed with phpcs for the whole of core.
Comment #17
Lars Toomre CreditAttribution: Lars Toomre as a volunteer commentedThis issue was stated before those new guidelines were posted. It is a review of a new experimental module from a documentation perspective. As a result, it does contain a number of different types of changes. I am sorry that this work will not be committed as is. Others are welcome to split it up into smaller focused patches that are easier to review. Adding the 'Novice' tag as a result.
Comment #18
xjmThanks @Lars Toomre; I think that could be a good novice task (or set of novice tasks). Here are a few of the types of automatable fixes I see in this patch that can be addressed according to the coding standards cleanup guidelines (which BTW have existed since November 2014; they just weren't a part of this new single handbook page):
//
.(optional)
again.$param
.So all of those things would be good starting points to follow https://www.drupal.org/core/scope#coding-standards and contribute in #2571965: [meta] Fix PHP coding standards in core (one scope each).
Then there are a few kinds of fixes that involve improving documentation, so it can make sense to fix them for Migrate alone per the note at the end of the coding standards guidelines:
Comment #19
FernandoHV CreditAttribution: FernandoHV commentedContinued with the work but not finished it.
Comment #20
tbrameshbabu CreditAttribution: tbrameshbabu commentedSwitching to Needs Review to test the above patch
Comment #21
deepakaryan1988Comment #22
deepakaryan1988@xjm It looks like good to me.
Please have a review.
Comment #24
jeffrey.vargas CreditAttribution: jeffrey.vargas as a volunteer commentedI'm working on this in the Mentor Sprints at DrupalCon NOLA.
It no longer applies to 8.2.x-dev and requires a re-roll.
Comment #25
hussainwebThanks @jeffrey.vargas. Since this is a bug-report, this should go to 8.1.x (migrate is experimental anyway). I have added the tag which you may remove once you reroll and upload the patch.
Comment #26
jeffrey.vargas CreditAttribution: jeffrey.vargas as a volunteer commentedThanks hussainweb. Will review against 8.1.x.
Comment #27
kurthill4 CreditAttribution: kurthill4 commentedWe're a group at a conference, we'll look at it now as part of a sprint.
Comment #28
nJim CreditAttribution: nJim commentedWill add an issue summary to this ticket.
Comment #29
The Sean CreditAttribution: The Sean commentedComment #30
The Sean CreditAttribution: The Sean commentedComment #31
The Sean CreditAttribution: The Sean commentedComment #32
vegantriathleteGreat! We've got a couple awesome people working on https://www.drupal.org/contributor-tasks/reroll.
They will additionally test out the instructions at: https://www.drupal.org/patch/reroll
Comment #33
vegantriathleteWe've got another contributor working on: https://www.drupal.org/contributor-tasks/write-issue-summary
Comment #34
The Sean CreditAttribution: The Sean commentedUpdating the Issue Summary
Comment #35
The Sean CreditAttribution: The Sean commentedUpdating summary again - modifying Proposed Solution. I am new at this.
Comment #36
kurthill4 CreditAttribution: kurthill4 commentedRan into merge conflicts on four files, resolved and documenting... Stay tuned...
Comment #37
nJim CreditAttribution: nJim commentedRan into conflict during rebase process. Including a description of our resolutions:
/core/modules/migrate/Plugin/Migration.php
Retained the comment to read 'migration manager' to be consisten with the name of the function.
Retained the public function getDestinationIds.
/core/modules/migrate/Plugin/MigrationInterface.php
Retained the comments from the latest drupal release.
/core/modules/migrate/src/MigrateMessageInterface.php
Included the new file doc comment.
/core/modules/migrate/src/MigrateBuildDependencyInterface.php
Included the new file doc comment.
/core/modules/migrate/src/MigrateTemplateStorage.php
Included the new file.
/core/modules/migrate/src/MigrateTemplateStorageInterface.php
Included the new file.
Comment #38
kurthill4 CreditAttribution: kurthill4 commentedPrevious comment documents merge conflict resolutions
Comment #39
nJim CreditAttribution: nJim commentedComment #41
kurthill4 CreditAttribution: kurthill4 commentedWe spoke with one of the mentors who went over the fallure to apply; the issue seems to be related to path changes that occurred between 8.0.x and 8.2.x, when migrate was "moved out of entity". I plan to revisit this, but won't have time, for several days, probably. So if someone else wants to go over our patch and provide any feedback/comments, that would be great! If you take it and fix it, any summary of where we went wrong would also be great!
Thanks!
Comment #42
vegantriathleteComment #43
vprocessor CreditAttribution: vprocessor at Skilld commented#19 - rerolled
Comment #44
Mile23Note that we're also fixing coding standards systematically by coding standard error here: #2571965: [meta] Fix PHP coding standards in core
Comment #45
mikeryanAt least some of the standards being addressed here are also being addressed by children of #2571965: [meta] Fix PHP coding standards in core - once those are addressed, we can review this patch to see if there's anything left to do.
Note that the last patch brought back obsolete template-related classes that were removed in 8.1.x.
Comment #46
heddnWhile at some point this might become novice, I'm going to remove that until we are more certain on what should be accomplished in this issue.
Comment #47
alexpottThank you for your work on cleaning up Drupal core's code style!
In order to fix core coding standards in a maintainable way, all our coding standards issues should be done on a per-rule basis across all of core, rather than fixing standards in individual modules or files. We should also separate fixes where we need to write new documentation from fixes where we need to correct existing standards. This all should be done as part of #2571965: [meta] Fix PHP coding standards in core. A good place to start is the child issues of #2572645: [Meta] Fix 'Drupal.Commenting.FunctionComment' coding standard.
For background information on why we usually will not commit coding standards fixes that aren't scoped in that way, see the core issue scope guidelines, especially the note about coding standards cleanups. That document also includes numerous suggestions for scoping issues including documentation coding standards cleanups.
Contributing to the overall plan above will help ensure that your fixes for core's coding standards remain in core the long term.
I'm going to close this issue - migrate is part of core and should not be dealt with separately.