private function DeprecationAnalyzer::getSubExtensionInfoFiles in Upgrade Status 8.2
Same name and namespace in other branches
- 8.3 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 669
Class
Namespace
Drupal\upgrade_statusCode
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;
}