Problem/Motivation
Currently, the `SystemRequirements` class contains two constants that do not logically belong there:
DRUPAL_CORE_REMOVED_MODULE_LIST DRUPAL_CORE_REMOVED_THEME_LIST
These constants track modules and themes removed from Drupal core, but `SystemRequirements` is intended for install time system checks (PHP version, database, extensions, etc.).
Steps to reproduce
1. Inspect the `SystemRequirements` class in Drupal core (`core/includes/install.inc` or related location in 10.x/11.x).
2. Observe the presence of the following constants:
DRUPAL_CORE_REMOVED_MODULE_LIST DRUPAL_CORE_REMOVED_THEME_LIST
Proposed resolution
Move the constants to a more appropriate location, such as:
* `core/lib/Drupal/Core/Extension/Extension.php` or another class responsible for module and theme management.
* A dedicated `RemovedCoreExtensionList` class or enum.
Remaining tasks
- Update all references to the constants to point to the new location.
- Add or update test coverage if necessary.
- Ensure backward compatibility with deprecated access from `SystemRequirements` if required.
User interface changes
None. This is an internal refactoring.
Introduced terminology
API changes
| Comment | File | Size | Author |
|---|
Issue fork drupal-3574156
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
sivaji_ganesh_jojodae commentedComment #3
longwaveLinked issue has landed.
Comment #4
nicxvan commentedsivaji_ganesh_jojodae thank you for updating this, a couple of things I want to clarify:
SystemRequirements is for install time checks not runtime
I don't think we want them here even if it makes sense on it's face
I'm much more in favor of something dedicated whether it's a class or enum
Comment #5
dcam commentedTitle typo
Comment #8
mstrelan commentedEnums can't hold arrays. Have gone with a single new class with two constants and helper methods.
Comment #9
smustgrave commentedWould be good to get this in as I'm like on the 1 yard line for being done with stable9 and hoping shortcut isn't far behind.
LGTM
Comment #10
nicxvan commentedCan't this land in 11.5?
Comment #11
mstrelan commentedDon't know, can it? I guess since 12.0.0 and 11.5.0 should be at the same time, then maybe yes? I chose 12.0.0 based on this:
But those 27 deprecations are all for this one CKEditor issue, so might not be relevant: https://www.drupal.org/node/3581531
Comment #12
nicxvan commentedI think that's just because 11.4 isn't out yet, if you run
grep -r "deprecated in drupal:11.4" core | wc -lin sure there are many.I'm on my phone though so I can't check.
Comment #13
mstrelan commentedYeah there are. I'm just not sure what the cutoff is for deprecations in 11.x, I think it was originally going to be 11.4 if 12.0 was coming out at the same time, but that's not the case, so probably 11.5 is right.
Comment #14
smustgrave commentedThis one seems non disruptive that would hope can make 11.4 but don’t make that call
Comment #15
catchThis looks fine except I'm not sure why it's in the core namespace given the only consumer in in system module - should it be in system module instead? Seems pretty internal to the requirements hooks overall.
Comment #16
smustgrave commentedFor #15
Comment #17
mstrelan commentedMoved to system module. I think it seemed to make sense next to
\Drupal\Core\Extension\ExtensionLifecycle, but since it's only used by system module you're right that it makes more sense there. It feels like it should go in to a subdir though rather than at the namespace root, but I don't think anything else made sense. Have updated the CR too.Comment #18
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.