diff --git a/composer.lock b/composer.lock
index ad1fd31dd8..3d71c5d99d 100644
--- a/composer.lock
+++ b/composer.lock
@@ -2353,16 +2353,16 @@
         },
         {
             "name": "symfony/yaml",
-            "version": "v3.4.4",
+            "version": "3.4.x-dev",
             "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",
@@ -4533,6 +4527,7 @@
     "aliases": [],
     "minimum-stability": "dev",
     "stability-flags": {
+        "symfony/yaml": 20,
         "behat/mink": 20,
         "behat/mink-selenium2-driver": 20
     },
diff --git a/core/composer.json b/core/composer.json
index 62e765947d..a4820d5d46 100644
--- a/core/composer.json
+++ b/core/composer.json
@@ -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.x-dev",
         "twig/twig": "^1.35.0",
         "doctrine/common": "^2.5",
         "doctrine/annotations": "^1.2",
diff --git a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
index 27e9d789f0..e6741fcbea 100644
--- a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
+++ b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
@@ -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);
     }
 
     /**
diff --git a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
index 03990d8e46..3165815b17 100644
--- a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
+++ b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
@@ -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));
 
