Commit 77a1e091 authored by catch's avatar catch

Issue #2945275 by alexpott: Remove hack to fix bug in symfony/yaml

parent 13a1a4e3
......@@ -2353,16 +2353,16 @@
},
{
"name": "symfony/yaml",
"version": "v3.4.4",
"version": "v3.4.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "eab73b6c21d27ae4cd037c417618dfd4befb0bfe"
"reference": "6af42631dcf89e9c616242c900d6c52bd53bd1bb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/eab73b6c21d27ae4cd037c417618dfd4befb0bfe",
"reference": "eab73b6c21d27ae4cd037c417618dfd4befb0bfe",
"url": "https://api.github.com/repos/symfony/yaml/zipball/6af42631dcf89e9c616242c900d6c52bd53bd1bb",
"reference": "6af42631dcf89e9c616242c900d6c52bd53bd1bb",
"shasum": ""
},
"require": {
......@@ -2407,7 +2407,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2018-01-21T19:05:02+00:00"
"time": "2018-02-16T09:50:28+00:00"
},
{
"name": "twig/twig",
......@@ -3019,12 +3019,6 @@
"url": "https://git.drupal.org/project/coder.git",
"reference": "984c54a7b1e8f27ff1c32348df69712afd86b17f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/klausi/coder/zipball/984c54a7b1e8f27ff1c32348df69712afd86b17f",
"reference": "984c54a7b1e8f27ff1c32348df69712afd86b17f",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": ">=5.4.0",
......
......@@ -30,7 +30,7 @@
"symfony/validator": "~3.4.0",
"symfony/process": "~3.4.0",
"symfony/polyfill-iconv": "^1.0",
"symfony/yaml": "~3.4.0",
"symfony/yaml": "~3.4.5",
"twig/twig": "^1.35.0",
"doctrine/common": "^2.5",
"doctrine/annotations": "^1.2",
......
......@@ -329,10 +329,7 @@ protected function loadFile($file)
throw new InvalidArgumentException(sprintf('The service file "%s" is not valid.', $file));
}
// @todo Remove preg_replace() once
// https://github.com/symfony/symfony/pull/25787 is in Symfony 3.4.
$content = preg_replace('/:$\n^\s+{\s*}$/m', ': {}', file_get_contents($file));
return $this->validate(Yaml::decode($content), $file);
return $this->validate(Yaml::decode(file_get_contents($file)), $file);
}
/**
......
......@@ -120,9 +120,6 @@ protected function prepareSettings() {
// Add a listener to validate configuration schema on save.
$yaml = new SymfonyYaml();
$content = file_get_contents($directory . '/services.yml');
// @todo Remove preg_replace() once
// https://github.com/symfony/symfony/pull/25787 is in Symfony 3.4.
$content = preg_replace('/:$\n^\s+{\s*}$/m', ': {}', $content);
$services = $yaml->parse($content);
$services['services']['simpletest.config_schema_checker'] = [
'class' => ConfigSchemaChecker::class,
......@@ -168,11 +165,7 @@ protected function setContainerParameter($name, $value) {
$filename = $this->siteDirectory . '/services.yml';
chmod($filename, 0666);
// @todo Remove preg_replace() once
// https://github.com/symfony/symfony/pull/25787 is in Symfony 3.4.
$content = file_get_contents($filename);
$content = preg_replace('/:$\n^\s+{\s*}$/m', ': {}', $content);
$services = Yaml::decode($content);
$services = Yaml::decode(file_get_contents($filename));
$services['parameters'][$name] = $value;
file_put_contents($filename, Yaml::encode($services));
......
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