You are here

private function DeprecationAnalyzer::getSubExtensionInfoFiles in Upgrade Status 8.3

Same name and namespace in other branches
  1. 8.2 src/DeprecationAnalyzer.php \Drupal\upgrade_status\DeprecationAnalyzer::getSubExtensionInfoFiles()

Finds all .info.yml files for non-test extensions under a path.

Parameters

string $path: Base path to find all info.yml files in.

Return value

array A list of paths to .info.yml files found under the base path.

1 call to DeprecationAnalyzer::getSubExtensionInfoFiles()
DeprecationAnalyzer::analyze in src/DeprecationAnalyzer.php
Analyze the codebase of an extension including all its sub-components.

File

src/DeprecationAnalyzer.php, line 840

Class

DeprecationAnalyzer

Namespace

Drupal\upgrade_status

Code

private function getSubExtensionInfoFiles(string $path) {
  $files = [];
  foreach (glob($path . '/*.info.yml') as $file) {

    // Make sure the filename matches rules for an extension. There may be
    // info.yml files in shipped configuration which would have more parts.
    $parts = explode('.', basename($file));
    if (count($parts) == 3) {
      $files[] = $file;
    }
  }
  foreach (glob($path . '/*', GLOB_ONLYDIR | GLOB_NOSORT) as $dir) {
    $files = array_merge($files, $this
      ->getSubExtensionInfoFiles($dir));
  }
  return $files;
}