Themes do not support namespaced dependencies, see #474684: Allow themes to declare dependencies on modules

You are about to DROP all tables in your 'd8' database. Do you want to continue? (y/n): y
Starting Drupal installation. This takes a while. Consider using the        [ok]
--notify global option.
Drupal\Core\Installer\Exception\InstallerException: Required modules:    [error]
Required modules not found.

The following modules are required but were not found. Move them into
the appropriate modules subdirectory, such as <em>/modules</em>.
Missing modules: <div class="item-list--comma-list item-list"><ul
class="item-list__comma-list"><li><span
class="admin-missing">Drupal:action</span></li><li><span
class="admin-missing">Drupal:automated_cron</span></li><li><span
class="admin-missing">Drupal:block</span></li><li><span
class="admin-missing">Drupal:block_content</span></li><li><span
class="admin-missing">Drupal:breakpoint</span></li><li><span
class="admin-missing">Drupal:ckeditor</span></li><li><span

And so on

Comments

andypost created an issue. See original summary.

andypost’s picture

This is because https://api.drupal.org/api/drupal/core%21includes%21install.inc/function... does not remove prefixes
$missing_modules = array_diff($info['dependencies'], $present_modules);

andypost’s picture

Looks it needs separate issue for 8.x core

andypost’s picture

Status: Active » Needs review
StatusFileSize
new915 bytes
andypost’s picture

StatusFileSize
new2.3 KB
andypost’s picture

StatusFileSize
new2.62 KB
andypost’s picture

StatusFileSize
new4.01 KB
andypost’s picture

StatusFileSize
new1.01 KB

Patch without tests

andypost’s picture

The related shows that themes does not support dependencies at all

tobby’s picture

StatusFileSize
new2.59 KB

I've been using the patch in #8 with some success for the namespaced dependency issues in install profiles. Though, I'm submitting this attached patch (that I've been using locally) to just remove the sniffer altogether, since it also finds false positives in modules generated from Features (which does not use the namespaced dependencies yet, either). I know that won't be ideal for some, and probably not for the long-term support of this issue, but it's helpful for now if you have a project with a custom install profile and lots of Features modules, until Drupal 8.4 and Features both support the namespaces.

andypost’s picture

kdebisschop’s picture

StatusFileSize
new945 bytes
new1.01 KB

Since https://www.drupal.org/project/drupal/issues/2855026 has merged to core, #8 should be updated to scan profiles (but still ignore themes).

klausi’s picture

Version: 8.x-2.x-dev » 8.x-3.x-dev
Status: Needs review » Needs work
Issue tags: +Needs tests

Can you add a comment that we need this because of theme info files not supporting namespaces?

Can you also provide a test case so that we can be sure this works?

Probably best to create a pull request against https://github.com/pfrenssen/coder , then we can see test results on Travis CI.

  • klausi committed 0c76f8e on 8.x-3.x
    fix(NamespaceDependency): Allow not namespaced dependencies in theme...
klausi’s picture

Issue summary: View changes
Status: Needs work » Fixed
Issue tags: -Needs tests

Committed a different approach to fix this to make an exception for theme info files.

klausi’s picture

Title: False positives in DrupalPractice.InfoFiles.NamespacedDependency.NonNamespaced » Allow not namespaced dependencies in theme info YAML files

Status: Fixed » Closed (fixed)

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