- Issue created by @xurizaemon
- πΊπΈUnited States m.stenta
We should be careful here to ensure that we don't make the same mistake made in Migrate Tools. If the method signature is changed in such a way that it breaks downstream code using/extending it, then Migrate Source UI MUST increment its major version and properly document this.
That is, unless Migrate Source UI isn't committed to semantic versioning... :-(
Perhaps this would be a good time to switch from 8.x-1.x to a 2.0.x with true semantic versioning.
Let's see what gets committed in π New parameters introduced in MigrateExecutable class constructor Active first ...
- π³πΏNew Zealand xurizaemon Εtepoti, Aotearoa π
Good point Michael. I feel I'm confused now from juggling changes (and git is giving me weird results / not showing changes from upstream?), so I'm going to leave this for tonight. Thanks!
- heddn Nicaragua
The fixes for this were already in the dev branch. I thought I'd released it in a tag, but must have missed it.
https://www.drupal.org/project/migrate_source_ui/releases/8.x-1.3 β
Automatically closed - issue fixed for 2 weeks with no activity.
- πΊπΈUnited States m.stenta
We should be careful here to ensure that we don't make the same mistake made in Migrate Tools. If the method signature is changed in such a way that it breaks downstream code using/extending it, then Migrate Source UI MUST increment its major version and properly document this.
That is, unless Migrate Source UI isn't committed to semantic versioning... :-(
This change broke farmOS CSV importers... again. Exactly as I predicted it would. :-(
@heddn can we please consider adopting true semantic versioning across all these `migrate_*` projects and commit to not introducing breaking changes outside of major version updates?
- πΊπΈUnited States m.stenta
Specifically, farmOS has its own form class that extends the one from this module (
class CsvImportForm extends MigrateSourceUiForm
) in order to inject additional dependencies, so by changing the__construct()
signature of this module's class, it breaks any downstream module classes that extend it.https://github.com/farmOS/farmOS/blob/3.x/modules/core/import/modules/cs...
These are the PHPStan failures that alerted us to the issue (our automated tests for CSV importers also failed):
------ ---------------------------------------------------------------------- Line modules/core/import/modules/csv/src/Form/CsvImportForm.php ------ ---------------------------------------------------------------------- 70 Method Drupal\migrate_source_ui\Form\MigrateSourceUiForm::__construct() invoked with 3 parameters, 6 required. 80 Return type mixed of method Drupal\farm_import_csv\Form\CsvImportForm::create() is not covariant with return type static(Drupal\migrate_source_ui\Form\MigrateSourceUiForm) of method Drupal\migrate_source_ui\Form\MigrateSourceUiForm::create(). 95 Return type mixed of method Drupal\farm_import_csv\Form\CsvImportForm::getFormId() is not covariant with return type string of method Drupal\migrate_source_ui\Form\MigrateSourceUiForm::getFormId(). 102 Return type mixed of method Drupal\farm_import_csv\Form\CsvImportForm::buildForm() is not covariant with return type array of method Drupal\migrate_source_ui\Form\MigrateSourceUiForm::buildForm(). 123 Return type mixed of method Drupal\farm_import_csv\Form\CsvImportForm::validateForm() is not covariant with return type void of method Drupal\migrate_source_ui\Form\MigrateSourceUiForm::validateForm(). ------ ----------------------------------------------------------------------
- heddn Nicaragua
I'm confused. Forms aren't part of the the BC promise. See https://www.drupal.org/about/core/policies/core-change-policies/bc-polic... β