Skip to content

Issue #3335468: Presence of migrations will trigger warning

This MR adds a couple of migration yaml which can trigger the E_NOTICE reported in #3335468.

Not sure if this should have a more specific test, but this change is sufficient to reveal the behaviour via existing test coverage.

12) Drupal\Tests\workbench_moderation_migrate\Kernel\WorkbenchModerationMigrateTest::testWithAwkwardCases with data set "Highest rev ID is not the current published revision (274511)" (array(array(array(274511, 959631, 'page', 'en', 'Node #274511 title', 1, 1, 1500000000, 1619807861, 0, 0, 0, 0, 0)), array(array(274511, 959631, 1, 'Node #274511 title', 'Current', 1619807861, 1, 0, 0, 0), array(274511, 959636, 1, 'Node #274511 title', 'Previous with higher rev', 1619806567, 1, 0, 0, 0)), array(array(733111, 959631, 274511, 'published', 'draft', 1, 1619806567, 0, 0), array(733191, 959631, 274511, 'draft', 'published', 1, 1619807861, 1, 1), array(733116, 959636, 274511, 'published', 'published', 1, 1619806567, 0, 0)), array(array('draft', 'Draft', 'Work in progress', -10), array('needs_review', 'Needs Review', 'Ready for moderation', -9), array('published', 'Published', 'Make this version live', -7), array('reviewed', 'Reviewed', 'Work has been reviewed', -8), array('unpublished', 'Unpublished', 'Unpublish content', 0)), array(array(1, 'Single edit and ready for review', 'published', 'needs_review'), array(6, 'Submit for Review', 'draft', 'needs_review'), array(11, 'Edited by Admin or Publisher', 'draft', 'published'), array(16, 'Work in Progress', 'published', 'draft'), array(21, 'Reviewed', 'draft', 'reviewed'), array(26, 'Reviewed and ready for publication', 'reviewed', 'published'), array(31, 'Needs more work', 'needs_review', 'draft'), array(36, 'Unpublish', 'published', 'unpublished'))), array(array(true, array(array(1, 'published', 1)))))
Undefined array key "node_type"

/app/web/modules/workbench_moderation_migrate/workbench_moderation_migrate.module:80
/app/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:562
/app/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:334
/app/web/core/modules/migrate/src/Plugin/MigrationPluginManager.php:259
/app/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:175
/app/web/core/modules/migrate/src/Plugin/MigrationPluginManager.php:148
/app/web/core/modules/migrate/src/Plugin/MigrationPluginManager.php:107
/app/web/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php:192
/app/web/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php:195
/app/web/modules/workbench_moderation_migrate/tests/src/Kernel/WorkbenchModerationMigrateTest.php:70
/app/web/modules/workbench_moderation_migrate/tests/src/Kernel/WorkbenchModerationMigrateTest.php:160
/app/web/vendor/phpunit/phpunit/src/Framework/TestResult.php:703
Edited by Chris Burgess

Merge request reports