Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

runDrupalCheck doesn't check multisite modules/themes #7

@nmillin

Description

@nmillin

Background

The runDrupalCheck command

public function runDrupalCheck($type) {
will check custom modules or themes, but won't check modules/themes installed for the multisite.

Ideas

  1. Have a new blt command (ex: blt tests:deprecated:multisite) that would run against all sites in the multisite
  2. Add an option to include the multisite in existing commands
  3. something else

Feedback

I wanted to see what people thought of this direction. Right now I'm patching the DrupalCheckCommand.php for my use case, so I don't have an immediate need for this functionality. Maybe someone else would need this and it could be helpful.

// Get all sites in multisite
    $multisites = $this->getConfigValue('multisites');

    foreach ($multisites as $multisite) {
      $this->say("Checking for Deprecated Code in docroot/sites/$multisite/$type/custom");
      $result = $this->taskExecStack()
        ->dir($this->getConfigValue('repo.root'))
        ->exec("$bin/drupal-check -d $docroot/sites/$multisite/$type/custom")
        ->run();
      $exit_code = $result->getExitCode();
      if ($exit_code) {
        $this->logger->notice('Review Deprecation warnings and re-run.');
        throw new BltException("Drupal Check in docroot/$type/custom failed.");
      }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions