diff --git a/core/includes/common.inc b/core/includes/common.inc
index f2a2b4c..a81391c 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -13,8 +13,8 @@
 use Drupal\Core\Language\Language;
 use Symfony\Component\HttpFoundation\Response;
 use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\Yaml\Parser;
-use Symfony\Component\Yaml\Exception\ParseException;
+use Drupal\Core\Serialization\Yaml;
+use Drupal\Core\Serialization\Exception\InvalidDataTypeException;
 use Drupal\Component\PhpStorage\PhpStorageFactory;
 use Drupal\Component\Utility\NestedArray;
 use Drupal\Core\Datetime\DrupalDateTime;
diff --git a/core/lib/Drupal/Core/Asset/LibraryDiscovery.php b/core/lib/Drupal/Core/Asset/LibraryDiscovery.php
index 130876a..6a0eb30 100644
--- a/core/lib/Drupal/Core/Asset/LibraryDiscovery.php
+++ b/core/lib/Drupal/Core/Asset/LibraryDiscovery.php
@@ -13,9 +13,8 @@
 use Drupal\Core\Cache\CacheBackendInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Extension\ThemeHandlerInterface;
-use Symfony\Component\Yaml\Exception\ParseException;
-use Symfony\Component\Yaml\Parser;
-
+use Drupal\Core\Serialization\Yaml;
+use Drupal\Core\Serialization\Exception\InvalidDataTypeException;
 
 /**
  * Discovers available asset libraries in Drupal.
@@ -299,12 +298,11 @@ protected function fileValidUri($source) {
    *   Thrown when a parser exception got thrown.
    */
   protected function parseLibraryInfo($extension, $library_file) {
-    $parser = new Parser();
     try {
-      $this->libraries[$extension] = $parser->parse(file_get_contents(DRUPAL_ROOT . '/' . $library_file));
+      $this->libraries[$extension] = Yaml::decode(file_get_contents(DRUPAL_ROOT . '/' . $library_file));
     }
-    catch (ParseException $e) {
-      // Rethrow a more helpful exception, since ParseException lacks context.
+    catch (InvalidDataTypeException $e) {
+      // Rethrow a more helpful exception to provide context.
       throw new InvalidLibraryFileException(sprintf('Invalid library definition in %s: %s', $library_file, $e->getMessage()), 0, $e);
     }
     // Allow modules to alter the module's registered libraries.
diff --git a/core/lib/Drupal/Core/Config/ConfigManager.php b/core/lib/Drupal/Core/Config/ConfigManager.php
index d1048ea..25c996b 100644
--- a/core/lib/Drupal/Core/Config/ConfigManager.php
+++ b/core/lib/Drupal/Core/Config/ConfigManager.php
@@ -11,7 +11,7 @@
 use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Entity\EntityTypeInterface;
 use Drupal\Core\StringTranslation\TranslationManager;
-use Symfony\Component\Yaml\Dumper;
+use Drupal\Core\Serialization\Yaml;
 
 /**
  * The ConfigManager provides helper functions for the configuration system.
@@ -101,11 +101,8 @@ public function diff(StorageInterface $source_storage, StorageInterface $target_
     // The output should show configuration object differences formatted as YAML.
     // But the configuration is not necessarily stored in files. Therefore, they
     // need to be read and parsed, and lastly, dumped into YAML strings.
-    $dumper = new Dumper();
-    $dumper->setIndentation(2);
-
-    $source_data = explode("\n", $dumper->dump($source_storage->read($name), PHP_INT_MAX));
-    $target_data = explode("\n", $dumper->dump($target_storage->read($name), PHP_INT_MAX));
+    $source_data = explode("\n", Yaml::encode($source_storage->read($name)));
+    $target_data = explode("\n", Yaml::encode($target_storage->read($name)));
 
     // Check for new or removed files.
     if ($source_data === array('false')) {
diff --git a/core/lib/Drupal/Core/Config/FileStorage.php b/core/lib/Drupal/Core/Config/FileStorage.php
index 14268e9..69559bb 100644
--- a/core/lib/Drupal/Core/Config/FileStorage.php
+++ b/core/lib/Drupal/Core/Config/FileStorage.php
@@ -8,9 +8,8 @@
 namespace Drupal\Core\Config;
 
 use Drupal\Component\Utility\String;
-use Symfony\Component\Yaml\Dumper;
-use Symfony\Component\Yaml\Exception\DumpException;
-use Symfony\Component\Yaml\Parser;
+use Drupal\Core\Serialization\Yaml;
+use Drupal\Core\Serialization\Exception\InvalidDataTypeException;
 
 /**
  * Defines the file storage controller.
@@ -25,20 +24,6 @@ class FileStorage implements StorageInterface {
   protected $directory = '';
 
   /**
-   * A shared YAML dumper instance.
-   *
-   * @var \Symfony\Component\Yaml\Dumper
-   */
-  protected $dumper;
-
-  /**
-   * A shared YAML parser instance.
-   *
-   * @var \Symfony\Component\Yaml\Parser
-   */
-  protected $parser;
-
-  /**
    * Constructs a new FileStorage controller.
    *
    * @param string $directory
@@ -78,16 +63,22 @@ public function exists($name) {
   /**
    * Implements Drupal\Core\Config\StorageInterface::read().
    *
-   * @throws Symfony\Component\Yaml\Exception\ParseException
+   * @throws \Drupal\Core\Config\UnsupportedDataTypeConfigException
    */
   public function read($name) {
     if (!$this->exists($name)) {
       return FALSE;
     }
     $data = file_get_contents($this->getFilePath($name));
-    // @todo Yaml throws a ParseException on invalid data. Is it expected to be
-    //   caught or not?
-    $data = $this->decode($data);
+    try {
+      $data = $this->decode($data);
+    }
+    catch (InvalidDataTypeException $e) {
+      throw new UnsupportedDataTypeConfigException(String::format('Invalid data type in config @name: !message', array(
+        '@name' => $name,
+        '!message' => $e->getMessage(),
+      )));
+    }
     return $data;
   }
 
@@ -114,8 +105,11 @@ public function write($name, array $data) {
     try {
       $data = $this->encode($data);
     }
-    catch(DumpException $e) {
-      throw new UnsupportedDataTypeConfigException(String::format('Invalid data type for used in config: @name', array('@name' => $name)));
+    catch (InvalidDataTypeException $e) {
+      throw new UnsupportedDataTypeConfigException(String::format('Invalid data type in config @name: !message', array(
+        '@name' => $name,
+        '!message' => $e->getMessage(),
+      )));
     }
 
     $target = $this->getFilePath($name);
@@ -154,51 +148,17 @@ public function rename($name, $new_name) {
   }
 
   /**
-   * Gets the YAML dumper instance.
-   *
-   * @return Symfony\Component\Yaml\Dumper
-   */
-  protected function getDumper() {
-    if (!isset($this->dumper)) {
-      $this->dumper = new Dumper();
-      // Set Yaml\Dumper's default indentation for nested nodes/collections to
-      // 2 spaces for consistency with Drupal coding standards.
-      $this->dumper->setIndentation(2);
-    }
-    return $this->dumper;
-  }
-
-  /**
-   * Gets the YAML parser instance.
-   *
-   * @return Symfony\Component\Yaml\Parser
-   */
-  protected function getParser() {
-    if (!isset($this->parser)) {
-      $this->parser = new Parser();
-    }
-    return $this->parser;
-  }
-
-  /**
    * Implements Drupal\Core\Config\StorageInterface::encode().
-   *
-   * @throws Symfony\Component\Yaml\Exception\DumpException
    */
   public function encode($data) {
-    // The level where you switch to inline YAML is set to PHP_INT_MAX to ensure
-    // this does not occur. Also set the exceptionOnInvalidType parameter to
-    // TRUE, so exceptions are thrown for an invalid data type.
-    return $this->getDumper()->dump($data, PHP_INT_MAX, 0, TRUE);
+    return Yaml::encode($data);
   }
 
   /**
    * Implements Drupal\Core\Config\StorageInterface::decode().
-   *
-   * @throws Symfony\Component\Yaml\Exception\ParseException
    */
   public function decode($raw) {
-    $data = $this->getParser()->parse($raw);
+    $data = Yaml::decode($raw);
     // A simple string is valid YAML for any reason.
     if (!is_array($data)) {
       return FALSE;
diff --git a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
index cd7a17d..e68e60e 100644
--- a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
+++ b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
@@ -7,12 +7,12 @@
 
 namespace Drupal\Core\DependencyInjection;
 
+use Drupal\Core\Serialization\Yaml;
 use Symfony\Component\DependencyInjection\Alias;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\DependencyInjection\Definition;
 use Symfony\Component\DependencyInjection\DefinitionDecorator;
 use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\Yaml\Parser;
 
 /**
  * YamlFileLoader loads YAML files service definitions.
@@ -194,8 +194,7 @@ protected function parseDefinition($id, $service, $filename) {
    *   The file content.
    */
   protected function loadFile($filename) {
-    $parser = new Parser();
-    return $this->validate($parser->parse(file_get_contents($filename)), $filename);
+    return $this->validate(Yaml::decode(file_get_contents($filename)), $filename);
   }
 
   /**
diff --git a/core/lib/Drupal/Component/Discovery/DiscoverableInterface.php b/core/lib/Drupal/Core/Discovery/DiscoverableInterface.php
similarity index 89%
rename from core/lib/Drupal/Component/Discovery/DiscoverableInterface.php
rename to core/lib/Drupal/Core/Discovery/DiscoverableInterface.php
index 45f0494..8f0ce9c 100644
--- a/core/lib/Drupal/Component/Discovery/DiscoverableInterface.php
+++ b/core/lib/Drupal/Core/Discovery/DiscoverableInterface.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\Core\Discovery\DiscoverableInterface.
  */
 
-namespace Drupal\Component\Discovery;
+namespace Drupal\Core\Discovery;
 
 /**
  * Interface for classes providing a type of discovery.
diff --git a/core/lib/Drupal/Component/Discovery/YamlDiscovery.php b/core/lib/Drupal/Core/Discovery/YamlDiscovery.php
similarity index 69%
rename from core/lib/Drupal/Component/Discovery/YamlDiscovery.php
rename to core/lib/Drupal/Core/Discovery/YamlDiscovery.php
index 5ac0b7d..2b84ab6 100644
--- a/core/lib/Drupal/Component/Discovery/YamlDiscovery.php
+++ b/core/lib/Drupal/Core/Discovery/YamlDiscovery.php
@@ -2,12 +2,12 @@
 
 /**
  * @file
- * Contains \Drupal\Component\Discovery\YamlDiscovery.
+ * Contains \Drupal\Core\Discovery\YamlDiscovery.
  */
 
-namespace Drupal\Component\Discovery;
+namespace Drupal\Core\Discovery;
 
-use Symfony\Component\Yaml\Parser;
+use Drupal\Core\Serialization\Yaml;
 
 /**
  * Provides discovery for YAML files within a given set of directories.
@@ -29,13 +29,6 @@ class YamlDiscovery implements DiscoverableInterface {
   protected $directories = array();
 
   /**
-   * The symfony YAML parser.
-   *
-   * @var \Symfony\Component\Yaml\Parser
-   */
-  protected $parser;
-
-  /**
    * Constructs a YamlDiscovery object.
    *
    * @param string $name
@@ -54,29 +47,14 @@ public function __construct($name, array $directories) {
    */
   public function findAll() {
     $all = array();
-    $parser = $this->parser();
-
     foreach ($this->findFiles() as $provider => $file) {
-      $all[$provider] = $parser->parse(file_get_contents($file));
+      $all[$provider] = Yaml::decode(file_get_contents($file));
     }
 
     return $all;
   }
 
   /**
-   * Returns the YAML parser.
-   *
-   * @return \Symfony\Component\Yaml\Parser
-   *   The symfony YAML parser.
-   */
-  protected function parser() {
-    if (!isset($this->parser)) {
-      $this->parser = new Parser();
-    }
-    return $this->parser;
-  }
-
-  /**
    * Returns an array of file paths, keyed by provider.
    *
    * @return array
diff --git a/core/lib/Drupal/Core/Extension/InfoParser.php b/core/lib/Drupal/Core/Extension/InfoParser.php
index 4a23ad8..f158bfb 100644
--- a/core/lib/Drupal/Core/Extension/InfoParser.php
+++ b/core/lib/Drupal/Core/Extension/InfoParser.php
@@ -8,8 +8,8 @@
 namespace Drupal\Core\Extension;
 
 use Drupal\Component\Utility\String;
-use Symfony\Component\Yaml\Exception\ParseException;
-use Symfony\Component\Yaml\Parser;
+use Drupal\Core\Serialization\Yaml;
+use Drupal\Core\Serialization\Exception\InvalidDataTypeException;
 
 /**
  * Parses extension .info.yml files.
@@ -24,13 +24,6 @@ class InfoParser implements InfoParserInterface {
   protected static $parsedInfos = array();
 
   /**
-   * Symfony YAML parser object.
-   *
-   * @var \Symfony\Component\Yaml\Parser
-   */
-  protected $parser;
-
-  /**
    * {@inheritdoc}
    */
   public function parse($filename) {
@@ -40,16 +33,16 @@ public function parse($filename) {
       }
       else {
         try {
-          static::$parsedInfos[$filename] = $this->getParser()->parse(file_get_contents($filename));
+          static::$parsedInfos[$filename] = Yaml::decode(file_get_contents($filename));
         }
-        catch (ParseException $e) {
-          $message = String::format("Unable to parse !file. Parser error !error.", array('!file' => $filename, '!error' => $e->getMessage()));
-          throw new InfoParserException($message, $filename);
+        catch (InvalidDataTypeException $e) {
+          $message = String::format("Unable to parse !file: !error", array('!file' => $filename, '!error' => $e->getMessage()));
+          throw new InfoParserException($message);
         }
         $missing_keys = array_diff($this->getRequiredKeys(), array_keys(static::$parsedInfos[$filename]));
         if (!empty($missing_keys)) {
           $message = format_plural(count($missing_keys), 'Missing required key (!missing_keys) in !file.', 'Missing required keys (!missing_keys) in !file.', array('!missing_keys' => implode(', ', $missing_keys), '!file' => $filename));
-          throw new InfoParserException($message, $filename);
+          throw new InfoParserException($message);
         }
         if (isset(static::$parsedInfos[$filename]['version']) && static::$parsedInfos[$filename]['version'] === 'VERSION') {
           static::$parsedInfos[$filename]['version'] = \Drupal::VERSION;
@@ -60,19 +53,6 @@ public function parse($filename) {
   }
 
   /**
-   * Returns a parser for parsing .info.yml files.
-   *
-   * @return \Symfony\Component\Yaml\Parser
-   *   Symfony YAML parser object.
-   */
-  protected function getParser() {
-    if (!$this->parser) {
-      $this->parser = new Parser();
-    }
-    return $this->parser;
-  }
-
-  /**
    * Returns an array of keys required to exist in .info.yml file.
    *
    * @return array
diff --git a/core/lib/Drupal/Core/Extension/InfoParserException.php b/core/lib/Drupal/Core/Extension/InfoParserException.php
index 2804bf6..df8071f 100644
--- a/core/lib/Drupal/Core/Extension/InfoParserException.php
+++ b/core/lib/Drupal/Core/Extension/InfoParserException.php
@@ -10,35 +10,4 @@
  * An exception thrown by the InfoParser class whilst parsing info.yml files.
  */
 class InfoParserException extends \RuntimeException {
-
-  /**
-   * The info.yml filename.
-   *
-   * @var string
-   */
-  protected $infoFilename;
-
-  /**
-   * Constructs the InfoParserException object.
-   *
-   * @param string $message
-   *   The Exception message to throw.
-   * @param string $filename
-   *   The info.yml filename.
-   */
-  public function __construct($message, $info_filename) {
-    $this->infoFilename = $info_filename;
-    parent::__construct($message);
-  }
-
-  /**
-   * Gets the info.yml filename.
-   *
-   * @return string
-   *   The info.yml filename.
-   */
-  public function getInfoFilename () {
-    return $this->infoFilename;
-  }
-
 }
diff --git a/core/lib/Drupal/Core/Extension/ModuleHandler.php b/core/lib/Drupal/Core/Extension/ModuleHandler.php
index 17b4239..81a3b21 100644
--- a/core/lib/Drupal/Core/Extension/ModuleHandler.php
+++ b/core/lib/Drupal/Core/Extension/ModuleHandler.php
@@ -8,9 +8,9 @@
 namespace Drupal\Core\Extension;
 
 use Drupal\Component\Graph\Graph;
-use Symfony\Component\Yaml\Parser;
 use Drupal\Component\Utility\NestedArray;
 use Drupal\Core\Cache\CacheBackendInterface;
+use Drupal\Core\Serialization\Yaml;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -819,8 +819,7 @@ protected function removeCacheBins($module) {
     // Remove any cache bins defined by a module.
     $service_yaml_file = drupal_get_path('module', $module) . "/$module.services.yml";
     if (file_exists($service_yaml_file)) {
-      $parser = new Parser;
-      $definitions = $parser->parse(file_get_contents($service_yaml_file));
+      $definitions = Yaml::decode(file_get_contents($service_yaml_file));
       if (isset($definitions['services'])) {
         foreach ($definitions['services'] as $id => $definition) {
           if (isset($definition['tags'])) {
diff --git a/core/lib/Drupal/Core/Plugin/Discovery/YamlDiscovery.php b/core/lib/Drupal/Core/Plugin/Discovery/YamlDiscovery.php
index 516704b..5f2fa87 100644
--- a/core/lib/Drupal/Core/Plugin/Discovery/YamlDiscovery.php
+++ b/core/lib/Drupal/Core/Plugin/Discovery/YamlDiscovery.php
@@ -8,7 +8,7 @@
 namespace Drupal\Core\Plugin\Discovery;
 
 use Drupal\Component\Plugin\Discovery\DiscoveryInterface;
-use Drupal\Component\Discovery\YamlDiscovery as ComponentYamlDiscovery;
+use Drupal\Core\Discovery\YamlDiscovery as YamlDiscoveryHelper;
 
 /**
  * Allows YAML files to define plugin definitions.
@@ -18,7 +18,7 @@ class YamlDiscovery implements DiscoveryInterface {
   /**
    * YAML file discovery and parsing handler.
    *
-   * @var \Drupal\Component\Discovery\YamlDiscovery
+   * @var \Drupal\Core\Discovery\YamlDiscovery
    */
   protected $discovery;
 
@@ -32,7 +32,7 @@ class YamlDiscovery implements DiscoveryInterface {
    *   An array of directories to scan.
    */
   function __construct($name, array $directories) {
-    $this->discovery = new ComponentYamlDiscovery($name, $directories);
+    $this->discovery = new YamlDiscoveryHelper($name, $directories);
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Routing/RouteBuilder.php b/core/lib/Drupal/Core/Routing/RouteBuilder.php
index 8df9f67..e45db8a 100644
--- a/core/lib/Drupal/Core/Routing/RouteBuilder.php
+++ b/core/lib/Drupal/Core/Routing/RouteBuilder.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\Core\Routing;
 
-use Drupal\Component\Discovery\YamlDiscovery;
+use Drupal\Core\Discovery\YamlDiscovery;
 use Drupal\Core\Controller\ControllerResolverInterface;
 use Drupal\Core\KeyValueStore\StateInterface;
 use Symfony\Component\EventDispatcher\Event;
@@ -50,7 +50,7 @@ class RouteBuilder implements RouteBuilderInterface {
   /**
    * The yaml discovery used to find all the .routing.yml files.
    *
-   * @var \Drupal\Component\Discovery\YamlDiscovery
+   * @var \Drupal\Core\Discovery\YamlDiscovery
    */
   protected $yamlDiscovery;
 
diff --git a/core/lib/Drupal/Core/Serialization/Exception/InvalidDataTypeException.php b/core/lib/Drupal/Core/Serialization/Exception/InvalidDataTypeException.php
new file mode 100644
index 0000000..e6b8ce6
--- /dev/null
+++ b/core/lib/Drupal/Core/Serialization/Exception/InvalidDataTypeException.php
@@ -0,0 +1,14 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\Serialization\Exception\InvalidDataTypeException.
+ */
+
+namespace Drupal\Core\Serialization\Exception;
+
+/**
+ * Exception thrown when a data type is invalid.
+ */
+class InvalidDataTypeException extends \InvalidArgumentException {
+}
diff --git a/core/lib/Drupal/Core/Serialization/SerializationInterface.php b/core/lib/Drupal/Core/Serialization/SerializationInterface.php
new file mode 100644
index 0000000..7713032
--- /dev/null
+++ b/core/lib/Drupal/Core/Serialization/SerializationInterface.php
@@ -0,0 +1,45 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\Serialization\SerializationInterface.
+ */
+
+namespace Drupal\Core\Serialization;
+
+/**
+ * Defines an interface for serialization formats.
+ */
+interface SerializationInterface {
+
+  /**
+   * Encodes data into the serialization format.
+   *
+   * @param mixed $data
+   *   The data to encode.
+   *
+   * @return string
+   *   The encoded data.
+   */
+  public static function encode($data);
+
+  /**
+   * Decodes data from the serialization format.
+   *
+   * @param string $raw
+   *   The raw data string to decode.
+   *
+   * @return mixed
+   *   The decoded data.
+   */
+  public static function decode($raw);
+
+  /**
+   * Returns the file extension for this serialization format.
+   *
+   * @return string
+   *   The file extension, without leading dot.
+   */
+  public static function getFileExtension();
+
+}
diff --git a/core/lib/Drupal/Core/Serialization/Yaml.php b/core/lib/Drupal/Core/Serialization/Yaml.php
new file mode 100644
index 0000000..ec64ffd
--- /dev/null
+++ b/core/lib/Drupal/Core/Serialization/Yaml.php
@@ -0,0 +1,49 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\Serialization\Yaml.
+ */
+
+namespace Drupal\Core\Serialization;
+
+use Drupal\Core\Serialization\Exception\InvalidDataTypeException;
+use Symfony\Component\Yaml\Yaml as Symfony;
+
+/**
+ * Default serialization for YAML using the Symfony component.
+ */
+class Yaml implements SerializationInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function encode($data) {
+    try {
+      return Symfony::dump($data, PHP_INT_MAX, 2, TRUE);
+    }
+    catch (\Exception $e) {
+      throw new InvalidDataTypeException($e->getMessage(), $e->getCode(), $e);
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function decode($raw) {
+    try {
+      return Symfony::parse($raw, TRUE);
+    }
+    catch (\Exception $e) {
+      throw new InvalidDataTypeException($e->getMessage(), $e->getCode(), $e);
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function getFileExtension() {
+    return 'yml';
+  }
+
+}
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigSingleImportExportTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigSingleImportExportTest.php
index 46a14d4..d386024 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigSingleImportExportTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigSingleImportExportTest.php
@@ -7,8 +7,8 @@
 
 namespace Drupal\config\Tests;
 
+use Drupal\Core\Serialization\Yaml;
 use Drupal\simpletest\WebTestBase;
-use Symfony\Component\Yaml\Yaml;
 
 /**
  * Tests the user interface for importing/exporting a single configuration.
@@ -111,12 +111,11 @@ public function testImport() {
    */
   public function testImportSimpleConfiguration() {
     $this->drupalLogin($this->drupalCreateUser(array('import configuration')));
-    $yaml = new Yaml();
     $config = \Drupal::config('system.site')->set('name', 'Test simple import');
     $edit = array(
       'config_type' => 'system.simple',
       'config_name' => $config->getName(),
-      'import' => $yaml->dump($config->get()),
+      'import' => Yaml::encode($config->get()),
     );
     $this->drupalPostForm('admin/config/development/configuration/single/import', $edit, t('Import'));
     $this->assertRaw(t('Are you sure you want to update the %name @type?', array('%name' => $config->getName(), '@type' => 'simple configuration')));
diff --git a/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php b/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php
index 140b50a..ed620d8 100644
--- a/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php
+++ b/core/modules/config/lib/Drupal/config/Tests/Storage/ConfigStorageTestBase.php
@@ -27,7 +27,6 @@
    * Tests storage CRUD operations.
    *
    * @todo Coverage: Trigger PDOExceptions / Database exceptions.
-   * @todo Coverage: Trigger Yaml's ParseException and DumpException.
    */
   function testCRUD() {
     $name = 'config_test.storage';
diff --git a/core/modules/config/lib/Drupal/config/Tests/Storage/FileStorageTest.php b/core/modules/config/lib/Drupal/config/Tests/Storage/FileStorageTest.php
index d430bd3..39c2e62 100644
--- a/core/modules/config/lib/Drupal/config/Tests/Storage/FileStorageTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/Storage/FileStorageTest.php
@@ -8,7 +8,7 @@
 namespace Drupal\config\Tests\Storage;
 
 use Drupal\Core\Config\FileStorage;
-use Symfony\Component\Yaml\Yaml;
+use Drupal\Core\Serialization\Yaml;
 
 /**
  * Tests FileStorage controller operations.
@@ -33,7 +33,7 @@ function setUp() {
 
   protected function read($name) {
     $data = file_get_contents($this->storage->getFilePath($name));
-    return Yaml::parse($data);
+    return Yaml::decode($data);
   }
 
   protected function insert($name, $data) {
diff --git a/core/modules/menu_link/lib/Drupal/menu_link/StaticMenuLinks.php b/core/modules/menu_link/lib/Drupal/menu_link/StaticMenuLinks.php
index 5e8e1ce..0522e95 100644
--- a/core/modules/menu_link/lib/Drupal/menu_link/StaticMenuLinks.php
+++ b/core/modules/menu_link/lib/Drupal/menu_link/StaticMenuLinks.php
@@ -6,7 +6,8 @@
  */
 
 namespace Drupal\menu_link;
-use Drupal\Component\Discovery\YamlDiscovery;
+
+use Drupal\Core\Discovery\YamlDiscovery;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 
 /**
@@ -60,7 +61,7 @@ public function getLinks() {
   /**
    * Creates a YAML discovery for menu links.
    *
-   * @return \Drupal\Component\Discovery\YamlDiscovery
+   * @return \Drupal\Core\Discovery\YamlDiscovery
    *   An YAML discovery instance.
    */
   protected function getDiscovery() {
diff --git a/core/modules/system/lib/Drupal/system/Tests/Installer/DistributionProfileTest.php b/core/modules/system/lib/Drupal/system/Tests/Installer/DistributionProfileTest.php
index 4e3ae04..4049bb7 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Installer/DistributionProfileTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Installer/DistributionProfileTest.php
@@ -7,8 +7,8 @@
 
 namespace Drupal\system\Tests\Installer;
 
+use Drupal\Core\Serialization\Yaml;
 use Drupal\simpletest\InstallerTestBase;
-use Symfony\Component\Yaml\Yaml;
 
 /**
  * Tests the installer translation detection.
@@ -45,7 +45,7 @@ protected function setUp() {
     // File API functions are not available yet.
     $path = $this->siteDirectory . '/profiles/mydistro';
     mkdir($path, 0777, TRUE);
-    file_put_contents("$path/mydistro.info.yml", Yaml::dump($this->info, PHP_INT_MAX, 2));
+    file_put_contents("$path/mydistro.info.yml", Yaml::encode($this->info));
     file_put_contents("$path/mydistro.profile", "<?php\n");
 
     parent::setUp();
diff --git a/core/tests/Drupal/Tests/Component/Discovery/Fixtures/test_1/test_1.test.yml b/core/tests/Drupal/Tests/Core/Discovery/Fixtures/test_1/test_1.test.yml
similarity index 100%
rename from core/tests/Drupal/Tests/Component/Discovery/Fixtures/test_1/test_1.test.yml
rename to core/tests/Drupal/Tests/Core/Discovery/Fixtures/test_1/test_1.test.yml
diff --git a/core/tests/Drupal/Tests/Component/Discovery/Fixtures/test_2/test_2.test.yml b/core/tests/Drupal/Tests/Core/Discovery/Fixtures/test_2/test_2.test.yml
similarity index 100%
rename from core/tests/Drupal/Tests/Component/Discovery/Fixtures/test_2/test_2.test.yml
rename to core/tests/Drupal/Tests/Core/Discovery/Fixtures/test_2/test_2.test.yml
diff --git a/core/tests/Drupal/Tests/Component/Discovery/Fixtures/test_2/test_3.test.yml b/core/tests/Drupal/Tests/Core/Discovery/Fixtures/test_2/test_3.test.yml
similarity index 100%
rename from core/tests/Drupal/Tests/Component/Discovery/Fixtures/test_2/test_3.test.yml
rename to core/tests/Drupal/Tests/Core/Discovery/Fixtures/test_2/test_3.test.yml
diff --git a/core/tests/Drupal/Tests/Component/Discovery/YamlDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Discovery/YamlDiscoveryTest.php
similarity index 88%
rename from core/tests/Drupal/Tests/Component/Discovery/YamlDiscoveryTest.php
rename to core/tests/Drupal/Tests/Core/Discovery/YamlDiscoveryTest.php
index 325ef01..5d9781e 100644
--- a/core/tests/Drupal/Tests/Component/Discovery/YamlDiscoveryTest.php
+++ b/core/tests/Drupal/Tests/Core/Discovery/YamlDiscoveryTest.php
@@ -2,13 +2,13 @@
 
 /**
  * @file
- * Contains \Drupal\Tests\Component\Discovery\YamlDiscoveryTest.
+ * Contains \Drupal\Tests\Core\Discovery\YamlDiscoveryTest.
  */
 
-namespace Drupal\Tests\Component\Discovery;
+namespace Drupal\Tests\Core\Discovery;
 
 use Drupal\Tests\UnitTestCase;
-use Drupal\Component\Discovery\YamlDiscovery;
+use Drupal\Core\Discovery\YamlDiscovery;
 
 /**
  * Tests the YamlDiscovery component class.
diff --git a/core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php b/core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php
index 9e05a5c..aa2f581 100644
--- a/core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\Tests\Core\Routing;
 
-use Drupal\Component\Discovery\YamlDiscovery;
+use Drupal\Core\Discovery\YamlDiscovery;
 use Drupal\Core\DependencyInjection\ContainerBuilder;
 use Drupal\Core\Routing\RouteBuilder;
 use Drupal\Core\Routing\RouteBuildEvent;
@@ -57,7 +57,7 @@ class RouteBuilderTest extends UnitTestCase {
   /**
    * The mocked yaml discovery.
    *
-   * @var \Drupal\Component\Discovery\YamlDiscovery|\PHPUnit_Framework_MockObject_MockObject
+   * @var \Drupal\Core\Discovery\YamlDiscovery|\PHPUnit_Framework_MockObject_MockObject
    */
   protected $yamlDiscovery;
 
@@ -96,7 +96,7 @@ protected function setUp() {
     $this->dispatcher = $this->getMock('\Symfony\Component\EventDispatcher\EventDispatcherInterface');
     $this->moduleHandler = $this->getMock('Drupal\Core\Extension\ModuleHandlerInterface');
     $this->controllerResolver = $this->getMock('Drupal\Core\Controller\ControllerResolverInterface');
-    $this->yamlDiscovery = $this->getMockBuilder('\Drupal\Component\Discovery\YamlDiscovery')
+    $this->yamlDiscovery = $this->getMockBuilder('\Drupal\Core\Discovery\YamlDiscovery')
       ->disableOriginalConstructor()
       ->getMock();
     $this->state = $this->getMock('\Drupal\Core\KeyValueStore\StateInterface');
@@ -314,7 +314,7 @@ class TestRouteBuilder extends RouteBuilder {
   /**
    * Sets the yaml discovery.
    *
-   * @param \Drupal\Component\Discovery\YamlDiscovery $yaml_discovery
+   * @param \Drupal\Core\Discovery\YamlDiscovery $yaml_discovery
    *   The yaml discovery to set.
    */
   public function setYamlDiscovery(YamlDiscovery $yaml_discovery) {
