Commit 9db99355 authored by kristofferwiklund's avatar kristofferwiklund Committed by helmo

Issue #2911855 by kristofferwiklund: Drupal 8.4 support: Fix loading of module YML data.

parent 898e78b9
......@@ -19,7 +19,7 @@ function _provision_drupal_find_themes($scope, $key = '') {
$engines = array_merge($engines, drush_scan_directory($path . "/engines", "/\.engine$/", array('.', '..', 'CVS', '.svn'), 0, TRUE, 'name'));
}
foreach ($files as $name => $file) {
$files[$name]->info = Symfony\Component\Yaml\Yaml::parse($file->filename);
$files[$name]->info = Symfony\Component\Yaml\Yaml::parse(file_get_contents($file->filename));
if (!empty($files[$name]->info['name'])) {
$files[$name]->name = $files[$name]->info['name'];
}
......@@ -139,7 +139,7 @@ function _provision_find_profiles() {
$info_files = drush_scan_directory($profile_dir, "/\.info.yml$/");
foreach ($info_files as $path => $info_file) {
$path = realpath($path);
$info = Symfony\Component\Yaml\Yaml::parse($path);
$info = Symfony\Component\Yaml\Yaml::parse(file_get_contents($path));
if ($info['type'] == 'profile' && (!isset($info['hidden']) || !$info['hidden'])) {
$profile = new stdClass();
$profile->name = $info['name'];
......
......@@ -561,7 +561,7 @@ function _provision_drupal_find_modules($scope, $key = '') {
unset($files[$name]);
continue;
}
$files[$name]->info = Symfony\Component\Yaml\Yaml::parse($yaml_file);
$files[$name]->info = Symfony\Component\Yaml\Yaml::parse(file_get_contents($yaml_file));
if (!empty($files[$name]->info['name'])) {
$files[$name]->name = $files[$name]->info['name'];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment