Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem
- Dependencies between required core modules are not clear at all.
- Many tests needlessly install a full stack of modules providing functionality that is not required for the test at all.
Goal
- Clarify module dependencies. Even if they are bidirectional currently.
- Make web tests faster.
Proposed solution
- Replace
required = TRUE
with proper definitions ofdependencies[]
in .info files.
Required modules
- Filter
- Text
- Field
- Entity
- Menu Link
- System
- User
Comment | File | Size | Author |
---|---|---|---|
#10 | dep.gv_.png | 269.55 KB | sun |
#9 | dep.gv_.png | 355 KB | sun |
drupal8.dependencies.0.patch | 3.7 KB | sun | |
Comments
Comment #2
andypostdrupal8.dependencies.0.patch queued for re-testing.
Comment #4
sunSpin-off: #1934772: Filter module is not required, but is marked as required
Comment #5
andypostSuppose this one should in first
Comment #6
sunComment #7
sunComment #8
Berdirentity currently only exists because entity types must be provided by a module, see #2031717: Make entity module not required. The UI parts could be moved into field_ui, merged with field_ui into an entity_ui module or it could simply be made optional.
field is somewhat similar, although it provides a lot more API's for historical reasons. The plugin managers already moved to Core\Field, the field info stuff is supposed to be merged with the entity manager in #2116363: Unified repository of field definitions (cache + API), #597236: Add entity caching to core would move the field value cache to the entity system as well, invalidating most of the field cache clear calls (which makes up 50% of field.module now). Then it's just the field entities...
Menu link was kind of supposed to become optional eventually, although that will be a tough one ;)
Comment #9
sunTo give everyone else a better understanding of the current situation, here's a graph of the currently defined dependencies.
Comment #10
sunOr perhaps the attached graph is a bit more clear. (Discovered some better options.)
This explains why #2199637: Replace "required" flag of Field module with proper dependencies passes all tests after making User module depend on Field module.
Comment #11
yched CreditAttribution: yched commentedIn addition to what @Berdir said in #8, which is correct :
field.form.inc still contains functions that are needed for widgets (theme, after_build, ajax "add more", clustering of $form_state for forms with several nested entities). Widgets can now be used for base fields too, but still require that part of field.module to work.
Opened #2200355: Move functions in field.form.inc into Core/Field
Comment #23
quietone CreditAttribution: quietone at PreviousNext commentedI think this was fixed in #1793074: Convert .info files to YAML, closing as duplicate.