Comment mover 2.0.0-alpha2 release

Created on 21 June 2023, about 1 year ago
Updated 24 July 2023, 11 months ago

Problem/Motivation

This issue is to add more features to Comment Mover as it moves towards a beta release. Expect there will be at least one more alpha after this one.

Remaining tasks

Features I'm looking at for this release. Some may be deferred to the next one:

  • ✅ Move entity cut and paste links to proper place next to Add new comment.
  • Conversion of nodes to comments and comments to nodes.
  • Kernel tests for comment/node conversion.
  • Look at making cut and paste and clipboard links use Ajax.
  • Add UI convert to node button to block.
  • Add some functional/browser tests.
📌 Task
Status

Needs work

Version

2.0

Component

Code

Created by

🇮🇪Ireland lostcarpark

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @lostcarpark
  • @lostcarpark opened merge request.
  • 🇮🇪Ireland lostcarpark

    I currently have a blocker on a kernel test I'm writing for conversion of comment to node.

    In the CommentMover service, I have a function convertCommentToEntity. After creating a new entity, it will either convert the comment into a redirection message, or delete.

        if ($redirect) {
          // @todo Replace comment with redirection message.
        }
        else {
          $movingComment->delete();
        }
    

    However, when I try calling this from a kernel test, I get the following in phpunit:

    There was 1 error:
    
    1) Drupal\Tests\comment_mover\Kernel\CommentMoverServiceTest::testConvertCommentToNode
    PHPUnit\Framework\Exception: Segmentation fault (core dumped)
    
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684
    /var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:651
    /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:144
    /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:97
    
    --
    
    There was 1 risky test:
    
    1) Drupal\Tests\comment_mover\Kernel\CommentMoverServiceTest::testConvertCommentToNode
    This test did not perform any assertions
    
    /var/www/html/web/core/tests/Drupal/Tests/Listeners/DrupalListener.php:66
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:452
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684
    /var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:651
    /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:144
    /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:97
    

    I suspect there is some entity schema I've missed installing in my setup, but I have no idea what it could be.

    Would welcome any suggestions.

Production build 0.69.0 2024