We already have a FunctionalJavascript test that covers the case for creating and editing migrations. What this test doesn't cover however is PHP notices that are shown on screen (or written to the log).
While creating or editing migrations several PHP warnings occur, for example:
Notice: Undefined index: urls
Drupal\migrate_plus\Plugin\migrate\source\Url->__construct()
This makes it hard to provide test coverage for creating and editing migrations, because the tests fail on these PHP notices.
This is because plugins in Migrate Plus don't account for the case that some configuration is not set yet. In the example above the MigrateSource plugin "url" assumes that $configuration['urls']
always exists. This is not the case when a migration is just created in the UI.
To fix this, Migrate Plus plugins should implement \Drupal\Component\Plugin\ConfigurableInterface
. But before that can happen, Migrate plugin base classes should implement it first. But before that can be done, there should exist an uniform way to merge configuration in plugins first.
I think being able to add test coverage is vitally important to make the project maintainable. Therefore I think this issue is a blocker for making further progress on the project.
There could be a workaround: we could override/replace plugins from Migrate Plus and fix the issues we have in there. But I rather would like to have the base to be good.
defaultConfiguration()
for migrate plugins in Migrate Plus (for MigrateSource plugin "url" and probably others)Postponed
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.