Update to Drupal 8.2.0. For more information, see https://www.drupal.org/project/drupal/releases/8.2.0
This commit is contained in:
parent
2f563ab520
commit
f1c8716f57
1732 changed files with 52334 additions and 11780 deletions
|
@ -61,7 +61,7 @@ class YamlDiscovery implements DiscoverableInterface {
|
|||
foreach ($provider_by_files as $file => $provider) {
|
||||
// If a file is empty or its contents are commented out, return an empty
|
||||
// array instead of NULL for type consistency.
|
||||
$all[$provider] = Yaml::decode(file_get_contents($file)) ?: [];
|
||||
$all[$provider] = $this->decode($file);
|
||||
$file_cache->set($file, $all[$provider]);
|
||||
}
|
||||
}
|
||||
|
@ -69,6 +69,17 @@ class YamlDiscovery implements DiscoverableInterface {
|
|||
return $all;
|
||||
}
|
||||
|
||||
/**
|
||||
* Decode a YAML file.
|
||||
*
|
||||
* @param string $file
|
||||
* Yaml file path.
|
||||
* @return array
|
||||
*/
|
||||
protected function decode($file) {
|
||||
return Yaml::decode(file_get_contents($file)) ?: [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of file paths, keyed by provider.
|
||||
*
|
||||
|
|
Reference in a new issue