Number and email modules are now part of field module as for #2218199: Move email and number field types to \Drupal\Core\Field, remove modules

These tests are broken probably because of this:

  • MigrateProfileValuesTest
  • MigrateUserTest
  • MigrateDrupal6Test
  • MigrateFieldFormatterSettingsTest
  • MigrateUploadEntityDisplayTest
  • MigrateUploadEntityFormDisplayTest
  • MigrateViewModesTest
  • MigrateVocabularyEntityDisplayTest
  • MigrateVocabularyEntityFormDisplayTest
  • MigrateFieldInstanceTest
  • MigrateFieldTest
  • MigrateFieldWidgetSettingsTest
  • MigrateUserProfileFieldInstanceTest
  • MigrateUserProfileEntityFormDisplayTest
  • MigrateUserProfileEntityDisplayTest

Fixing it right now

Comments

pcambra’s picture

StatusFileSize
new6.67 KB

I've just pushed this patch but we need to investigate further some other tests that are failing still.

pcambra’s picture

Issue summary: View changes
benjy’s picture

+++ b/core/modules/migrate_drupal/config/migrate.migration.d6_field_formatter_settings.yml
@@ -32,13 +32,13 @@ process:
+          integer:
...
+          float:

@@ -50,7 +50,7 @@ process:
+          decimal:

These are the incoming values? Shouldn't we be changing the mapped value?

pcambra’s picture

Status: Active » Needs review
StatusFileSize
new10.65 KB

This is another patch fixing the tests, I'll take care of #3 in the next "batch".

benjy’s picture

Status: Needs review » Needs work
  1. +++ b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Plugin/migrate/process/d6/FieldTypeDefaults.php
    @@ -27,7 +27,10 @@ class FieldTypeDefaults extends ProcessPluginBase {
    +      elseif ($row->getSourceProperty('module') == 'number') {
    +        $value = $row->getSourceProperty('type');
    

    Why isn't the number type mapped in yaml if the value comes from the source?

  2. +++ b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateFieldFormatterSettingsTest.php
    @@ -98,7 +109,7 @@ public function testEntityDisplaySettings() {
    -    $expected['type'] = 'integer';
    +    $expected['type'] = 'number_integer';
    

    I thought that we just changed this because core now has integer rather than number_integer? #2218199: Move email and number field types to \Drupal\Core\Field, remove modules

pcambra’s picture

Thanks a lot for the review @benjy I might have done some mistakes because we've spent too much time figuring this already :)

About #1, I was getting errors on the module discovery, as number module is not there anymore but is part of field/core now, it wasn't detecting what the thing coming was so I'm doing a fallback to the type, which seemed to be fine. Not sure what other option would be.

About #2, field type is now "integer" but formatter is still "number_integer"

pcambra’s picture

Status: Needs work » Needs review
StatusFileSize
new11.3 KB

Ok, reviewed it and #3 and #5.1 were related, this should be better.

benjy’s picture

Status: Needs review » Reviewed & tested by the community

Awesome!