diff --git a/composer.lock b/composer.lock index eb2296d..43b74b6 100644 --- a/composer.lock +++ b/composer.lock @@ -1019,7 +1019,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", + "url": "https://api.github.com/repos/php-fig/log/zipball/1.0.0", "reference": "1.0.0", "shasum": "" }, diff --git a/core/lib/Drupal/Component/Serialization/Yaml.php b/core/lib/Drupal/Component/Serialization/Yaml.php index ca4909c..0eb54e8 100644 --- a/core/lib/Drupal/Component/Serialization/Yaml.php +++ b/core/lib/Drupal/Component/Serialization/Yaml.php @@ -5,6 +5,7 @@ use Drupal\Component\Serialization\Exception\InvalidDataTypeException; use Symfony\Component\Yaml\Parser; use Symfony\Component\Yaml\Dumper; +use Symfony\Component\Yaml\Yaml as YamlComponent; /** * Default serialization for YAML using the Symfony component. @@ -33,7 +34,7 @@ public static function decode($raw) { $yaml = new Parser(); // Make sure we have a single trailing newline. A very simple config like // 'foo: bar' with no newline will fail to parse otherwise. - return $yaml->parse($raw, TRUE, FALSE); + return $yaml->parse($raw, YamlComponent::PARSE_OBJECT); } catch (\Exception $e) { throw new InvalidDataTypeException($e->getMessage(), $e->getCode(), $e);