Problem/Motivation

Since #3124762: Add 'lifecycle' key to .info.yml files it has been impossible to enable modules with lifecycle: obsolete in their info.yml file.

Entity reference module is one such module.
However it also has a hook_requirements that prevents it from being installed.
This is now redundant

Proposed resolution

Remove that code

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#4 3225947-4.patch1.91 KBlarowlan
#4 interdiff-e5e7f1.txt1.11 KBlarowlan
#2 3225947.patch817 byteslarowlan

Comments

larowlan created an issue. See original summary.

larowlan’s picture

Status: Active » Needs review
StatusFileSize
new817 bytes
longwave’s picture

I tested this with Drush just in case. Before the patch:

$ ddev exec drush en entity_reference
Module entity_reference doesn't meet the requirements to be enabled. [error]

After:

$ ddev exec drush en entity_reference
The following extensions will be enabled: entity_reference
Do you really want to continue? (y/n): y
Drupal\Core\Extension\Exception\ObsoleteExtensionException: Unable to install modules: module 'entity_reference' is obsolete. in /var/www/html/drupal/core/lib/Drupal/Core/Extension/ModuleInstaller.php:126 [error]

So the end result is the same if the DX is slightly different, but I don't think that matters - this code is obsolete, much like the module :)

However, should we do the same treatment in simpletest.install?

larowlan’s picture

StatusFileSize
new1.11 KB
new1.91 KB

Agree

larowlan’s picture

longwave’s picture

Title: Remove redundant entity_reference.install » Remove redundant entity_reference.install and simpletest_install()
Status: Needs review » Reviewed & tested by the community

LGTM

  • catch committed acb41b7 on 9.3.x
    Issue #3225947 by larowlan, longwave: Remove redundant entity_reference....
catch’s picture

Status: Reviewed & tested by the community » Fixed

Nice to see the boilerplate removed.

Committed/pushed to 9.3.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.