Issue #3457014 - Drupal 10.3 break
In 10.2 $field->getClass()
returns \Drupal\Core\Field\EntityReferenceFieldItemList
In 10.3 $field->getClass()
returns Drupal\Core\Field\EntityReferenceFieldItemList
This makes the comparison fail.
Instanceof cannot be used here because $field is an instance of Drupal\field\Entity\FieldConfig
is_a()
is the correct way to check the class and should be more durable.
Closes #3457014