#2205271-153: Project namespace for dependencies has discovered issue with _system_rebuild_module_data_ensure_required. This function assumes that the dependency is always just the module name. It is not. It can contain project information and version information.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug because correct usage of module dependencies can result in php warnings.
Unfrozen changes Unfrozen because it is just a normal bug fix.
Disruption none

Comments

alexpott’s picture

Issue summary: View changes
StatusFileSize
new2.04 KB
new489 bytes

Note that #2205271: Project namespace for dependencies did not introduce this. Dependencies could have version strings before that change.

alexpott’s picture

Status: Active » Needs review
xano’s picture

+++ b/core/modules/system/system.module
@@ -927,11 +928,12 @@ function _system_rebuild_module_data() {
+      $dependency_name = ModuleHandler::parseDependency($dependant)['name'];

Nitpick: for code clarity, I suggest using $dependent_name, because a dependent and a dependency are each other's opposites.

Status: Needs review » Needs work

The last submitted patch, 1: 2410151.1-test-only.patch, failed testing.

alexpott’s picture

Status: Needs work » Needs review
StatusFileSize
new5.65 KB
new6.84 KB

re #3 gone the other way...

Status: Needs review » Needs work

The last submitted patch, 5: 2410151.5.patch, failed testing.

alexpott’s picture

Status: Needs work » Needs review
StatusFileSize
new4.74 KB
new2.1 KB

There was an unexpected item in the bagging area...

keopx’s picture

Status: Needs review » Reviewed & tested by the community

You had this issue patch in the previous code :P https://www.drupal.org/node/2266991#comment-9527049

Works fine!

trobey’s picture

It appears that this bug is also in Drupal 7.

trobey’s picture

I had a typo that generated an error similar to this issue. Also I did not not see in system_rebuild_module_data() or _system_rebuild_module_data() any call to drupal_parse_dependency(). It took a while to trace through the code to figure out that _module_build_dependencies() calls drupal_parse_dependency() and then system_modules() calls_drupal_check_incompatibility(). So I do not think I need to backport this to Drupal 7.

keopx queued 7: 2410151.7.patch for re-testing.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.0.x, thanks!

  • catch committed ce910dc on 8.0.x
    Issue #2410151 by alexpott: _system_rebuild_module_data_ensure_required...

Status: Fixed » Closed (fixed)

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