diff -u b/core/lib/Drupal/Core/Config/FileStorage.php b/core/lib/Drupal/Core/Config/FileStorage.php --- b/core/lib/Drupal/Core/Config/FileStorage.php +++ b/core/lib/Drupal/Core/Config/FileStorage.php @@ -18,7 +18,6 @@ * * @param string $name * The name for the configuration data. Should be lowercase. - * * @param string $directory * The directory where the configuration file is stored. If not provided * the directory set in settings.php is used. @@ -82,12 +81,12 @@ */ public function read() { if (!$this->exists()) { - throw new FileStorageReadException('Read file is does not exist.'); + throw new FileStorageReadException('Configuration file does not exist.'); } $data = $this->decode($this->filePath); if ($data === FALSE) { - throw new FileStorageReadException('Unable to decode file.'); + throw new FileStorageReadException('Unable to decode configuration file.'); } return $data; } @@ -103,14 +102,16 @@ /** * Implements StorageInterface::encode(). */ - public static function encode($data) { + public function encode($data) { + // Once the array nesting level reaches 5 switch to inline YAML for + // readability. return Yaml::dump($data, 5); } /** * Implements StorageInterface::decode(). */ - public static function decode($raw) { + public function decode($raw) { if (empty($raw)) { return array(); } only in patch2: unchanged: --- a/core/lib/Drupal/Core/Config/DatabaseStorage.php +++ b/core/lib/Drupal/Core/Config/DatabaseStorage.php @@ -53,14 +53,14 @@ class DatabaseStorage extends StorageBase { /** * Implements StorageInterface::encode(). */ - public static function encode($data) { + function encode($data) { return serialize($data); } /** * Implements StorageInterface::decode(). */ - public static function decode($raw) { + function decode($raw) { return unserialize($raw); } only in patch2: unchanged: --- a/core/lib/Drupal/Core/Config/StorageInterface.php +++ b/core/lib/Drupal/Core/Config/StorageInterface.php @@ -77,12 +77,12 @@ interface StorageInterface { /** * Encodes configuration data into the storage-specific format. */ - public static function encode($data); + function encode($data); /** * Decodes configuration data from the storage-specific format. */ - public static function decode($raw); + function decode($raw); /** * Gets names starting with this prefix.