Problem/Motivation
We failed to fully deprecated entity_reference module in 8.8.x, this means it needs to stay in 9.0.x so it can be properly uninstalled.
However we should make the module as minimal as possible and add an early update to uninstall it so we can actually do the removal in 10.0.x
Proposed resolution
1. Add a hook_requirements() to prevent entity_reference from being installed.
2. Add hidden: TRUE to .info.yml so the module can't be seen in the UI.
3. Add a post update to system module to uninstall the module.
4. Remove all of the deprecated code.
Critical because once #3062302: Properly deprecate the entity reference module lands it is going to add deprecations we then need to remove again, but this issue doesn't really depend on that one.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3111645-5.patch | 4.95 KB | bobbygryzynger |
Comments
Comment #2
catchComment #3
gábor hojtsyComment #4
bobbygryzyngerComment #5
bobbygryzynger1. Added this, although it doesn't seem to prevent Drush 10.x from installing the module. See https://github.com/drush-ops/drush/issues/3669
2. This was already present, so no changes here.
3. Added this.
4. Did this. The only remaining files are entity_reference.install and entity_reference.info.yml.
Comment #6
bobbygryzyngerComment #7
catchThis is already marked hidden in .info.yml, so I think we're ready here.
Comment #8
alexpottCommitted 46c8fe7 and pushed to 9.0.x. Thanks!
There was a very simple to fix conflict in core/modules/system/system.post_update.php due to the Simpletest removal - fixed on commit.
Comment #11
mikemadison commentedFYI I just performed the 9.3 update and this was still on in my configuration. I may have missed an update previously that disabled it? But for whatever reason, this needed to be manually removed from my core.extension config to disable after the drupal 9.3 update!
Comment #12
theuni commentedWhen running drush site-install (drush 10.6.2) for a fresh installation of D 9.3 I get
I do not have any config exported yet, what can be done?
Comment #13
gábor hojtsy@mikemadison: the code in
system_post_update_uninstall_entity_reference_module()in the committed change should have uninstalled it.@theuni: Would be good to know how did entity_reference ended in the modules to install list? It is not included by default.
Comment #14
theuni commented@gábor I'm installing contenta cms via
composer create-project contentacms/contenta-jsonapi-project.Any hint where to manually remove entity_reference from this repository before using composer create-project and
drush si?Comment #15
gábor hojtsy@theuni: Well contenta is not quite the same as Drupal 9.3 :D Please open an issue with Contenta to remove the entity refenrece module requirement in their codebase. The module's code has been integrated in the base system of Drupal and the module was an empty shell at best for quite a while.
Comment #16
theuni commented@gábor thanks, I've opened an issue.