The module is a toolset for improving migration components of Drupal core- and contrib modules.

See Migrate Magician online documentation.

Project link

https://www.drupal.org/project/migmag

Git instructions

git clone --branch 1.1.x https://git.drupalcode.org/project/migmag.git

PAreview checklist

http://pareview.net/r/317

Comments

huzooka created an issue. See original summary.

huzooka’s picture

About the issues raised by PAreview:

  1. The migmag_missing_plugins.module does not implement hook_help():
    Migmag Missing Plugins is a test module. I don't think it makes any sense to implement the help hook (and write help copy) for a test module. Or am I wrong?

  2. CS issue in RollbackableComponentEntityDisplayBase:
    The report points to a return statement at the end of a class method. I think (hope) that this is caused by the misinterpreted [] language construct right before the statement.

huzooka’s picture

Re #2.2:
My suspicion was confirmed: changing [] to list() eliminated the reported CS error.

Diff:

diff --git a/migmag_rollbackable/src/Plugin/migrate/destination/RollbackableComponentEntityDisplayBase.php b/migmag_rollbackable/src/Plugin/migrate/destination/RollbackableComponentEntityDisplayBase.php
index ea0f52a..3375c6a 100644
--- a/migmag_rollbackable/src/Plugin/migrate/destination/RollbackableComponentEntityDisplayBase.php
+++ b/migmag_rollbackable/src/Plugin/migrate/destination/RollbackableComponentEntityDisplayBase.php
@@ -38,11 +38,11 @@ abstract class RollbackableComponentEntityDisplayBase extends ComponentEntityDis
       }
     }
 
-    [
+    list(
       $entity_type,
       $bundle,
-      $mode,
-    ] = array_values($destination_ids ?? $row_or_destination_ids);
+      $mode
+    ) = array_values($destination_ids ?? $row_or_destination_ids);
 
     return $this->getEntity($entity_type, $bundle, $mode)->getConfigDependencyName();
   }
avpaderno’s picture

Thank you for applying!

Yes, implementing hook_help() in a test module doesn't probably make sense. I personally give less importance to that hook when reviewing a project. I prefer a module that doesn't implement that hook to a module that implements it just to not have that reported from automatic review tools.

As for the second point, that construct is perfectly correct. It's just the review tool that doesn't understand it, probably because it hasn't been updated to recognize some constructs recently introduced in PHP.

huzooka’s picture

@apaderno, thanks for the swift response!

huzooka’s picture

Issue summary: View changes

Changed target branch from 1.0.x to 1.1.x.

Explanation of the raised PAreview issues:

  1. The migmag_missing_plugins.module does not implement hook_help().

    migmag_missing_plugins is a test module. In #4, @apaderno and I agreed on that test modules don't have to implement hook_help.

  2. FILE: ...p/eflmhwsj/migmag_lookup/src/Plugin/migrate/process/MigMagLookup.php
    --------------------------------------------------------------------------
    80 | ERROR | [ ] Tags must be grouped together in a doc comment
    87 | ERROR | [ ] Tags must be grouped together in a doc comment
    90 | ERROR | [ ] Tags must be grouped together in a doc comment
    97 | ERROR | [ ] Tags must be grouped together in a doc comment
    

    These are misinterpreted code examples wrapped by @code and @endcode.

  3. FILE: ...p/eflmhwsj/migmag_lookup/src/Plugin/migrate/process/MigMagLookup.php
    --------------------------------------------------------------------------
    261 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 6
    262 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 6
    263 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 6
    264 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 8
    266 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 8
    268 | ERROR | [x] Line indented incorrectly; expected -4 spaces, found 8
    269 | ERROR | [x] Line indented incorrectly; expected -4 spaces, found 8
    270 | ERROR | [x] Line indented incorrectly; expected -4 spaces, found 8
    271 | ERROR | [x] Line indented incorrectly; expected -4 spaces, found 8
    276 | ERROR | [x] Line indented incorrectly; expected -4 spaces, found 8
    277 | ERROR | [x] Line indented incorrectly; expected -2 spaces, found 10
    278 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 12
    279 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 12
    280 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 12
    281 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 14
    282 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 12
    283 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 12
    284 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 14
    285 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 12
    286 | ERROR | [x] Line indented incorrectly; expected -2 spaces, found 10
    287 | ERROR | [x] Line indented incorrectly; expected -2 spaces, found 10
    288 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 12
    289 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 12
    290 | ERROR | [x] Line indented incorrectly; expected -2 spaces, found 10
    291 | ERROR | [x] Line indented incorrectly; expected -4 spaces, found 8
    292 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 6
    

    Misinterpreted [] constructs.

  4. FILE: ..._lookup/tests/src/Kernel/Plugin/migrate/process/MigMagLookupTest.php
    --------------------------------------------------------------------------
    FOUND 4 ERRORS AFFECTING 4 LINES
    --------------------------------------------------------------------------
    895 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 8
    896 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 10
    898 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 10
    900 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 8
    

    Misinterpreted [] constructs.

  5. FILE: ...lugin/migrate/destination/RollbackableComponentEntityDisplayBase.php
    --------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------
    47 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4
    --------------------------------------------------------------------------
    

    Misinterpreted [] constructs.

avpaderno’s picture

Priority: Normal » Critical

I changed the issue priority as described on Review process for security advisory coverage: What to expect / Application Review Timelines.

To reviewers: Please change back the priority to Normal after reviewing the project.

avpaderno’s picture

Assigned: Unassigned » avpaderno
Priority: Critical » Normal
Status: Needs review » Fixed

Thank you for your contribution! I am going to update your account.

These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

huzooka’s picture

Thanks for your trust!

Status: Fixed » Closed (fixed)

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